1900 |
InsertControlItem / UserEditor / A2X:
Dim h,hX With Exg2antt1 .BeginUpdate() .BackColor = Color.FromArgb(240,240,240) .Chart.set_PaneWidth(True,0) .ConditionalFormats.Add("1 = 1").Bold = True .Columns.Add("Type").Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.RightAlignment With .Items h = .AddItem("1. A ProgID such as ""MSCAL.Calendar.7""") .set_ItemDivider(h,0) hX = .InsertControlItem(0,"MSCAL.Calendar","") .get_ItemObject(hX).BackColor = Color.FromArgb(255,255,255) h = .AddItem("2. A CLSID such as ""{0036F83C-D892-4B7B-AA0B-BEDD8D16A738}""") .set_ItemDivider(h,0) hX = .InsertControlItem(0,"{0036F83C-D892-4B7B-AA0B-BEDD8D16A738}","") h = .AddItem("3. A URL such as ""http://www.exontrol.com""") .set_ItemDivider(h,0) hX = .InsertControlItem(0,"http://www.exontrol.com","") h = .AddItem("4. A reference to an Active document such as ""file://\\Documents\MyDoc.doc""") .set_ItemDivider(h,0) hX = .InsertControlItem(0,"file://C:\empesting.xml","") h = .AddItem("5.A fragment of HTML such as ""MSHTML:<HTML><BODY>This is a line of text</BODY></HTML>""") .set_ItemDivider(h,0) hX = .InsertControlItem(0,"MSHTML:<HTML><BODY>This is a <b>line of</b> text</BODY></HTML>","") .set_ItemHeight(hX,56) h = .AddItem("6.Anything, if it is preffixed by ""A2X:""") .set_ItemDivider(h,0) hX = .InsertControlItem(0,"A2X:TOC24.Toc24Ctrl.1","") End With .EndUpdate() End With |
1899 |
How do I add a RichTextBox editor
' UserEditorOleEvent event - Occurs when an user editor fires an event. Private Sub Exg2antt1_UserEditorOleEvent(ByVal sender As System.Object,ByVal Obj As Object,ByVal Ev As exontrol.EXG2ANTTLib.OleEvent,ByRef CloseEditor As Boolean,ByVal Item As Integer,ByVal ColIndex As Integer) Handles Exg2antt1.UserEditorOleEvent With Exg2antt1 Debug.Print( Ev ) End With End Sub With Exg2antt1 .BeginUpdate() .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines .DefaultItemHeight = 32 With .Columns.Add("RICHTEXT").Editor .EditType = exontrol.EXG2ANTTLib.EditTypeEnum.UserEditorType .UserEditor("RICHTEXT.RichtextCtrl","") With .UserEditorObject .AutoVerbMenu = True .TextRTF = "{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard\r\nThis is some {\b bold} text.\par\r\n}" End With End With With .Items .AddItem("RICHTEXT.RichtextCtrl") End With .EndUpdate() End With |
1898 |
Is it possible to trap a double-click event on a specific cell and when that happens, to set the cell to a specific value
' DblClick event - Occurs when the user dblclk the left mouse button over an object. Private Sub Exg2antt1_DblClick(ByVal sender As System.Object,ByVal Shift As Short,ByVal X As Integer,ByVal Y As Integer) Handles Exg2antt1.DblClick Dim c,h,hit With Exg2antt1 h = .get_ItemFromPoint(-1,-1,c,hit) Debug.Print( .Items.get_CellValue(h,c) ) End With End Sub With Exg2antt1 .BeginUpdate() .HeaderAppearance = exontrol.EXG2ANTTLib.AppearanceEnum.Etched .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exRowLines .Columns.Add("C1") .Columns.Add("C2") With .Items .set_CellValue(.AddItem("Item 1"),1,"Item 2") .set_CellValue(.AddItem("Item 3"),1,"Item 4") .set_CellValue(.AddItem("Item 5"),1,"Item 6") End With .EndUpdate() End With |
1897 |
How can I display dates in DD/MM/YYYY format
Dim h With Exg2antt1 .BeginUpdate() .ScrollBySingleLine = False .Columns.Add("Date") With .Items .set_ItemDivider(.AddItem("Different Date Formats"),0) .set_FormatCell(.AddItem(#12/1/1971#),0,"((shortdateF(value) mid 4) left 2) + `/` + (shortdateF (value) left 2) + `/` + (shortdateF (value) right 4)") .set_FormatCell(.AddItem(#12/1/1971#),0,"(1 array (0:=(shortdateF(value) split `/`))) + `/` + (0 array (=:0) ) + `/` + (2 array (=:0) )") .set_FormatCell(.AddItem(#12/1/1971#),0,"((`0` + day(value) ) right 2) + `/` + ((`0` + month(value) ) right 2) + `/` + year(value)") .set_FormatCell(.AddItem(#12/1/1971#),0,"day(value) + `/` + month(value) + `/` + year(value)") .set_FormatCell(.AddItem(#12/1/1971#),0,"year(value) + ` - ` + day(value) + ` - ` + month(value)") h = .AddItem(#12/1/1971#) .set_ItemHeight(h,24) .set_CellValueFormat(h,0,exontrol.EXG2ANTTLib.ValueFormatEnum.exHTML) .set_FormatCell(h,0,"`<b>` + year(value) + `</b><off -4> ` + day(value) + ` - ` + month(value)") .set_ItemDivider(.AddItem("Predefined Date Formats"),0) .set_FormatCell(.AddItem(#12/1/1971#),0,"value") .set_FormatCell(.AddItem(#12/1/1971#),0,"shortdateF(value)") .set_FormatCell(.AddItem(#12/1/1971#),0,"shortdate(value)") .set_FormatCell(.AddItem(#12/1/1971#),0,"longdate(value)") End With .EndUpdate() End With |
1896 |
I have noticed that the column gets resized once I release the mouse. I have a column that displays multiple-lines cells, and the text gets wrapped only when user releases the mouse. Is it possible to get resized contiguously as I had before
With Exg2antt1 .BeginUpdate() .ScrollBySingleLine = False .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exVLines .ColumnsAllowSizing = True .Columns.Add("Column A (cont)").set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exColumnResizeContiguously,True) .Columns.Add("Column 1") .Columns.Add("Column B (cont)").set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exColumnResizeContiguously,True) .Columns.Add("Column 2") .EndUpdate() End With |
1895 |
How do I get the column from cursor, when it hovers the empty portion of the items section
' MouseMove event - Occurs when the user moves the mouse. Private Sub Exg2antt1_MouseMoveEvent(ByVal sender As System.Object,ByVal Button As Short,ByVal Shift As Short,ByVal X As Integer,ByVal Y As Integer) Handles Exg2antt1.MouseMoveEvent Dim c,hit,i With Exg2antt1 i = .get_ItemFromPoint(0,-1,c,hit) Debug.Print( "Column" ) Debug.Print( c ) End With End Sub With Exg2antt1 .BeginUpdate() .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exVLines .Columns.Add("Column 0") .Columns.Add("Column 1") .Columns.Add("Column 2") .EndUpdate() End With |
1894 |
How do I add items once the user clicks the empty area
' Click event - Occurs when the user presses and then releases the left mouse button over the tree control. Private Sub Exg2antt1_Click(ByVal sender As System.Object) Handles Exg2antt1.Click Dim c,hit,i With Exg2antt1 i = .get_ItemFromPoint(0,-1,c,hit) With .Items .set_CellValue(.AddItem(i),1,c) End With End With End Sub With Exg2antt1 .BeginUpdate() .Columns.Add("Number of Items to Add") .Columns.Add("Click on Column") .EndUpdate() End With |
1893 |
Is there an easy way to get an effect like in a Microsoft Access / SQL-Server Table view, where you can scroll-up till the last row containing data is displayed as top-row
' AddItem event - Occurs after a new Item has been inserted to Items collection. Private Sub Exg2antt1_AddItem(ByVal sender As System.Object,ByVal Item As Integer) Handles Exg2antt1.AddItem With Exg2antt1 With .Items .AddBar(Item,"Task",.get_CellValue(Item,2),.get_CellValue(Item,4)) End With End With End Sub Dim rs With Exg2antt1 .BeginUpdate() .HasLines = exontrol.EXG2ANTTLib.HierarchyLineEnum.exNoLine .ColumnAutoResize = False rs = New ADODB.Recordset() With rs .Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",1,1) End With With .Chart .FirstVisibleDate = #10/21/1994# .LevelCount = 2 End With .DataSource = rs .ScrollBars = exontrol.EXG2ANTTLib.ScrollBarsEnum.exVScrollEmptySpace Or exontrol.EXG2ANTTLib.ScrollBarsEnum.exBoth .set_ScrollPos(True,.Items.ItemCount) .EndUpdate() End With |
1892 |
Is there any option to stop events
' AddItem event - Occurs after a new Item has been inserted to Items collection. Private Sub Exg2antt1_AddItem(ByVal sender As System.Object,ByVal Item As Integer) Handles Exg2antt1.AddItem With Exg2antt1 Debug.Print( "AddItem event is fired only if FreezeEvents(False) is called" ) End With End Sub ' AddLink event - Occurs when the user links two bars using the mouse. Private Sub Exg2antt1_AddLink(ByVal sender As System.Object,ByVal LinkKey As String) Handles Exg2antt1.AddLink With Exg2antt1 Debug.Print( "AddLink event is fired only if FreezeEvents(False) is called" ) End With End Sub ' BarResize event - Occurs when a bar is moved or resized. Private Sub Exg2antt1_BarResize(ByVal sender As System.Object,ByVal Item As Integer,ByVal Key As Object) Handles Exg2antt1.BarResize With Exg2antt1 Debug.Print( "BarResize event is fired only if FreezeEvents(False) is called" ) End With End Sub Dim h1,h2 With Exg2antt1 .FreezeEvents(True) .BeginUpdate() .DefaultItemHeight = 24 .Columns.Add("Task") With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,48) End With With .Items h1 = .AddItem("Task 1") .AddBar(h1,"Task",#1/2/2001#,#1/4/2001#,"") h2 = .AddItem("Task 2") .AddBar(h2,"Task",#1/2/2001#,#1/4/2001#,"") .AddLink("L1",h1,"",h2,"") .SchedulePDM(0,"") End With .EndUpdate() .FreezeEvents(False) End With |
1891 |
How do I specify a more intensive color if using RenderType property
Dim hSummaryJ,hSummaryK,hTaskJ,hTaskK With Exg2antt1 .BeginUpdate() With .VisualAppearance .RenderType = &Hff000000ui .Add(1,"gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDAMgBQKAAzQFAYahuGSGAAGMYxQgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQLOEgwH" & _ "IERQjEyUJAGGQIHhyPYbUbGUpQHKkeRtGqgBgoKhKEouNYgAbGYIwTRsdyfDSXBpEWwbDgkNQwWTDNoRDIUQStCysaYjOpnfrUAJ1P7FdQ1NJkXRhGSSK7maapaiCSZ6" & _ "STCMj1FhVKSNJ7DQKhGpgKh/ApgYpQOK4fLNXyRBK4QAyKA6bgPFZOZbFViaXY1V5bNKrcjhHQwAyHJ4XXRdV4YRAkUT4GqiJKGSYcQhuXZWbRqO6ABhef6DRThc6jKp" & _ "FHIE4llEcojHqSZNgoIxnlgd5thsLREleL43gsYZ9BkaAYkMAgAm+CxGDWWAtiKCRfjcdRgHoHYnicUwgAIEIREAaQYkcQZUHIGRUDQJBOEYRAhDYCxGgMZAkCgdYQha" & _ "XQIAYERwQuahXggdgeG6VZ4H4IhdiIGIOB8YIiGiHZZgqYpGF4KYHiKCI+CAU5jCiTQ2g0YhEFyax4gABAEIC") .Add(2,"gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQG" & _ "h+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKf" & _ "aZACj4arKejrRDCMAggI=") End With .Columns.Add("Task") With .Chart .set_PaneWidth(False,128) .FirstVisibleDate = #1/1/2001# With .Bars.Item("Task") .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .Color32 = &H1000000 End With With .Bars.Item("Summary") .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .Color32 = &H2000000 End With End With With .Items hSummaryJ = .AddItem("Summary A") .AddBar(hSummaryJ,"Summary",#1/2/2001#,#1/2/2001#,"J") hTaskJ = .InsertItem(hSummaryJ,Nothing,"Task A.1") .AddBar(hTaskJ,"Task",#1/2/2001#,#1/5/2001#,"J1") hTaskJ = .InsertItem(hSummaryJ,Nothing,"Task A.2") .AddBar(hTaskJ,"Task",#1/4/2001#,#1/8/2001#,"J2") .DefineSummaryBars(hSummaryJ,"J",-1,"<*>") hSummaryK = .AddItem("Summary B") .AddBar(hSummaryK,"Summary",#1/2/2001#,#1/2/2001#,"K") hTaskK = .InsertItem(hSummaryK,Nothing,"Task B.1") .AddBar(hTaskK,"Task",#1/2/2001#,#1/5/2001#,"K1") hTaskK = .InsertItem(hSummaryK,Nothing,"Task B.2") .AddBar(hTaskK,"Task",#1/4/2001#,#1/8/2001#,"K2") .DefineSummaryBars(hSummaryK,"K",-1,"<*>") .set_ItemBar(0,"<K*>",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255) .set_ExpandItem(0,True) End With .EndUpdate() End With |
1890 |
How can I include the child items, when a filter is applied
Dim h0 With Exg2antt1 .BeginUpdate() .ColumnAutoResize = True .ContinueColumnScroll = False .MarkSearchColumn = False .SearchColumnIndex = 1 .Indent = 16 .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot .FilterBarPromptVisible = True .FilterBarPromptPattern = "Nancy" .FilterInclude = exontrol.EXG2ANTTLib.FilterIncludeEnum.exItemsWithChilds .Chart.LevelCount = 2 With .Columns .Add("Name").Width = 96 .Add("Title").Width = 96 .Add("City") End With With .Items h0 = .AddItem("Nancy Davolio") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"Seattle") h0 = .InsertItem(h0,Nothing,"Andrew Fuller") .set_CellValue(h0,1,"Vice President, Sales") .set_CellValue(h0,2,"Tacoma") h0 = .InsertItem(h0,Nothing,"Michael Suyama") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"London") h0 = .AddItem("Janet Leverling") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"Kirkland") h0 = .InsertItem(h0,Nothing,"Margaret Peacock") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"Redmond") .set_ExpandItem(0,True) End With .ApplyFilter() .EndUpdate() End With |
1889 |
Is it possible to change the date format shown when you scroll the horizontal bar on the chart
|
1888 |
How do I change the drop down filter icon/button (white)
With Exg2antt1 .BeginUpdate() With .VisualAppearance .Add(2,"gBFLBCJwBAEHhEJAAEhABX8GACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGQaBUgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwYgmNYiTLAcgAN" & _ "J0WBaGIZJ4gOT5fDKMoEDRRYADFCscwxJybQAqGQKKb+VgAVY/cTyBIAEQSKA0TDOQ5TSKWB4JPZQRBEbZMNBtBIUJquKaqShdQJCU5FdY3Xblez9P7AMBwLFEC4NQ8Y" & _ "NYuPhjR4dRTIMhvVAsUArFh8Zg9GZZFjmDIDT4ydBLTQwcyVIKnP5qOa6XbmPoCQDYKxZHYxPzVDa3axuL76dqCAT7XrXNy1TbNRrzQKfcJqfCbdw2YaDZLOOT3fjuI4" & _ "hhKaRzFAHJ+jYQ4xHuY4gHuGIXGeExqC8Tp6C+PoEm+G5ImycRgh0XwvDGa5rgOeoejyXwnFeQp2mkf5ClgBB9gCWIYAwfYAEKV58mkdwOggNArgOXY2EWLoDkKOA0mg" & _ "bhOGgZApgaSBIHWSYHSmbApgYThmESZYJkIeIkgeCpfliLIHgpMIcmUYYYmODAlg2SI4mWfRfGOEguDcCRjFYAJihCQhJBSDoRmONgKEcI4kFCEJhhOVYTmYnAlEAQhW" & _ "BMJYJGYWoWmWSR2F6F5lnkWAQhUAgpEieRWEuSYkjWGpmkmNhuhuZwJkYcocmaaYkjyEhngnUA6lEFAlAEgI=") .Add(1,"CP:2 -4 -4 2 4") End With .set_Background32(exontrol.EXG2ANTTLib.BackgroundPartEnum.exHeaderFilterBarButton,&H1000000) .set_Background(exontrol.EXG2ANTTLib.BackgroundPartEnum.exCursorHoverColumn,.BackColor) .HeaderAppearance = exontrol.EXG2ANTTLib.AppearanceEnum.None2 .BackColorHeader = Color.FromArgb(255,255,255) .HeaderVisible = exontrol.EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels .HeaderHeight = 24 With .Columns.Add("Filter") .DisplayFilterButton = True .AllowSort = False .AllowDragging = False End With With .Chart .set_PaneWidth(False,196) .LevelCount = 2 End With .EndUpdate() End With |
1887 |
How do I prevent changing the cell's state ( check-box state )
' CellStateChanging event - Fired before cell's state is about to be changed. Private Sub Exg2antt1_CellStateChanging(ByVal sender As System.Object,ByVal Item As Integer,ByVal ColIndex As Integer,ByRef NewState As Integer) Handles Exg2antt1.CellStateChanging With Exg2antt1 With .Items NewState = .get_CellState(Item,ColIndex) End With End With End Sub Dim h With Exg2antt1 .BeginUpdate() .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot With .Columns.Add("P1") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .PartialCheck = True End With With .Columns.Add("P2") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .PartialCheck = True End With With .Items h = .AddItem("Root") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .set_ExpandItem(h,True) End With .EndUpdate() End With |
1886 |
How do I change the color of the columns's header to cover all levels
Dim h With Exg2antt1 .BeginUpdate() .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines .BackColorLevelHeader = .BackColorHeader .HeaderAppearance = exontrol.EXG2ANTTLib.AppearanceEnum.Etched .DefaultItemHeight = 36 .TreeColumnIndex = -1 With .Columns With .Add("C1") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .Width = 24 .AllowSizing = False .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft,3) End With With .Add("C2") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft,2) End With .Add("Column1") End With With .Chart .BackColorLevelHeader = Exg2antt1.BackColorHeader .LevelCount = 2 .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines .FirstVisibleDate = #6/22/2014# .set_PaneWidth(False,256) End With With .Items h = .AddItem("") .set_CellValue(h,1,"Cell 1.2") .set_CellValue(h,2,"Cell 1.3") .AddBar(h,"Task",#6/23/2014#,#6/25/2014#) h = .AddItem("") .set_CellValue(h,1,"Cell 2.2") .set_CellValue(h,2,"Cell 2.3") .AddBar(h,"Task",#6/26/2014#,#6/28/2014#) End With .EndUpdate() End With |
1885 |
Is it possible to extend the columns's header to fill all levels
Dim h With Exg2antt1 .BeginUpdate() .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines .HeaderVisible = exontrol.EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels .HeaderAppearance = exontrol.EXG2ANTTLib.AppearanceEnum.Etched .DefaultItemHeight = 36 .TreeColumnIndex = -1 With .Columns With .Add("C1") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .Width = 24 .AllowSizing = False .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft,3) End With With .Add("C2") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft,2) End With .Add("Column1") End With With .Chart .BackColorLevelHeader = Exg2antt1.BackColorHeader .LevelCount = 2 .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines .FirstVisibleDate = #6/22/2014# .set_PaneWidth(False,256) End With With .Items h = .AddItem("") .set_CellValue(h,1,"Cell 1.2") .set_CellValue(h,2,"Cell 1.3") .AddBar(h,"Task",#6/23/2014#,#6/25/2014#) h = .AddItem("") .set_CellValue(h,1,"Cell 2.2") .set_CellValue(h,2,"Cell 2.3") .AddBar(h,"Task",#6/26/2014#,#6/28/2014#) End With .EndUpdate() End With |
1884 |
How do I change the color of the columns's header to cover all levels (sample CRD)
Dim h With Exg2antt1 .BeginUpdate() .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines .BackColorLevelHeader = .BackColorHeader .HeaderAppearance = exontrol.EXG2ANTTLib.AppearanceEnum.Etched .DefaultItemHeight = 36 .TreeColumnIndex = -1 With .Columns With .Add("C1") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .Width = 24 .AllowSizing = False .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft,3) End With With .Add("C2") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft,2) End With .Add("Column1").Visible = False .Add("Column2").Visible = False .Add("Column3").Visible = False With .Add("FormatLevel") .FormatLevel = "18;""Info""[a=17]/(2/3,4)" .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellFormatLevel,"2/3,4") End With End With With .Chart .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines .FirstVisibleDate = #6/22/2014# .set_PaneWidth(False,256) .BackColorLevelHeader = Exg2antt1.BackColorHeader End With With .Items h = .AddItem("") .set_CellValue(h,1,"Cell 1.2") .set_CellValue(h,2,"Cell 1.3") .AddBar(h,"Task",#6/23/2014#,#6/25/2014#) h = .AddItem("") .set_CellValue(h,1,"Cell 2.2") .set_CellValue(h,2,"Cell 2.3") .AddBar(h,"Task",#6/26/2014#,#6/28/2014#) End With .EndUpdate() End With |
1883 |
Is it possible to extend the columns's header to fill all levels (sample CRD)
Dim h With Exg2antt1 .BeginUpdate() .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines .HeaderVisible = exontrol.EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels .HeaderAppearance = exontrol.EXG2ANTTLib.AppearanceEnum.Etched .DefaultItemHeight = 36 .TreeColumnIndex = -1 With .Columns With .Add("C1") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .Width = 24 .AllowSizing = False .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft,3) End With With .Add("C2") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft,2) End With .Add("Column1").Visible = False .Add("Column2").Visible = False .Add("Column3").Visible = False With .Add("FormatLevel") .FormatLevel = "18;""Info""[a=17]/(2/3,4)" .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellFormatLevel,"2/3,4") End With End With With .Chart .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines .FirstVisibleDate = #6/22/2014# .set_PaneWidth(False,256) .BackColorLevelHeader = Exg2antt1.BackColorHeader End With With .Items h = .AddItem("") .set_CellValue(h,1,"Cell 1.2") .set_CellValue(h,2,"Cell 1.3") .AddBar(h,"Task",#6/23/2014#,#6/25/2014#) h = .AddItem("") .set_CellValue(h,1,"Cell 2.2") .set_CellValue(h,2,"Cell 2.3") .AddBar(h,"Task",#6/26/2014#,#6/28/2014#) End With .EndUpdate() End With |
1882 |
How do I get sorted the column as string, numeric, date, date and time. Also how can it be applied to drop down filter panel
Dim h With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) With .Columns.Add("Date") .SortType = exontrol.EXG2ANTTLib.SortTypeEnum.SortDate .DisplayFilterButton = True .DisplayFilterPattern = False .DisplayFilterDate = True .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exShowFocusItem Or exontrol.EXG2ANTTLib.FilterListEnum.exShowCheckBox Or exontrol.EXG2ANTTLib.FilterListEnum.exSortItemsDesc End With With .Columns.Add("DateTime") .SortType = exontrol.EXG2ANTTLib.SortTypeEnum.SortDateTime .DisplayFilterButton = True .DisplayFilterPattern = False .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exShowFocusItem Or exontrol.EXG2ANTTLib.FilterListEnum.exShowCheckBox Or exontrol.EXG2ANTTLib.FilterListEnum.exSortItemsDesc End With With .Columns.Add("Time") .SortType = exontrol.EXG2ANTTLib.SortTypeEnum.SortTime .DisplayFilterButton = True .DisplayFilterPattern = False .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exShowFocusItem Or exontrol.EXG2ANTTLib.FilterListEnum.exShowCheckBox Or exontrol.EXG2ANTTLib.FilterListEnum.exSortItemsDesc .FormatColumn = "time(value)" End With With .Columns.Add("Numeric") .SortType = exontrol.EXG2ANTTLib.SortTypeEnum.SortNumeric .DisplayFilterButton = True .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exShowFocusItem Or exontrol.EXG2ANTTLib.FilterListEnum.exShowCheckBox Or exontrol.EXG2ANTTLib.FilterListEnum.exSortItemsDesc End With With .Columns.Add("String") .DisplayFilterButton = True .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exShowFocusItem Or exontrol.EXG2ANTTLib.FilterListEnum.exShowCheckBox Or exontrol.EXG2ANTTLib.FilterListEnum.exSortItemsDesc End With With .Items h = .AddItem(#1/27/2010#) .set_CellValue(h,1,#1/27/2010 10:00:00 AM#) .set_CellValue(h,2,.get_CellValue(h,1)) .set_CellValue(h,3,1) .set_CellValue(h,4,.get_CellValue(h,3)) h = .AddItem(#1/27/2011#) .set_CellValue(h,1,#1/27/2011 9:00:00 AM#) .set_CellValue(h,2,.get_CellValue(h,1)) .set_CellValue(h,3,11) .set_CellValue(h,4,.get_CellValue(h,3)) h = .AddItem(#11/2/2010#) .set_CellValue(h,1,#11/2/2010 9:00:00 AM#) .set_CellValue(h,2,.get_CellValue(h,1)) .set_CellValue(h,3,2) .set_CellValue(h,4,.get_CellValue(h,3)) End With .Columns.Item("DateTime").DisplayFilterDate = False .EndUpdate() End With |
1881 |
Is there a way to set the time zone per item
Dim h1 With Exg2antt1 .BeginUpdate() .Columns.Add("Task") .BackColorLevelHeader = .BackColor With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,48) End With With .Items h1 = .AddItem("Task A") .AddBar(h1,"",#1/2/2001#,#1/18/2001#,"TZ1","Time Zone / Item") .set_ItemBar(h1,"TZ1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarSelectable,False) .set_ItemBar(h1,"TZ1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor,255) .AddBar(h1,"Task",#1/20/2001#,#1/29/2001#,"Z1") h1 = .AddItem("Task B") .AddBar(h1,"",#1/6/2001#,#1/24/2001#,"TZ2","Time Zone / Item") .set_ItemBar(h1,"TZ2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarSelectable,False) .set_ItemBar(h1,"TZ2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor,65535) .AddBar(h1,"Task",#1/3/2001#,#1/12/2001#,"Z1") End With .EndUpdate() End With |
1880 |
Is there a way to turn arrow-key-navigation between the items on and off
' KeyDown event - Occurs when the user presses a key while an object has the focus. Private Sub Exg2antt1_KeyDown(ByVal sender As System.Object,ByRef KeyCode As Short,ByVal Shift As Short) Handles Exg2antt1.KeyDown With Exg2antt1 KeyCode = 0 End With End Sub Dim h1 With Exg2antt1 .BeginUpdate() .Columns.Add("Tasks") With .Columns.Add("Effort") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,21) .Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.SpinType End With With .Chart .LevelCount = 2 .NonworkingDays = 0 .set_PaneWidth(False,96) .FirstVisibleDate = #6/20/2005# .HistogramVisible = True .HistogramHeight = 128 .HistogramView = exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems With .Bars.Item("Task") .HistogramPattern = .Pattern .HistogramType = exontrol.EXG2ANTTLib.HistogramTypeEnum.exHistOverload .HistogramCriticalValue = 3 .ShowHistogramValues = "value>3?255:1" .HistogramItems = -11 .HistogramGridLinesColor = Color.FromArgb(192,192,192) .HistogramRulerLinesColor = Color.FromArgb(0,0,1) .FormatHistogramValues = "value format `2`" End With End With With .Items .AllowCellValueToItemBar = True h1 = .AddItem("Task 1") .AddBar(h1,"Task",#6/21/2005#,#6/23/2005#) .set_CellValue(h1,1,6.79) h1 = .AddItem("Task 2") .AddBar(h1,"Task",#6/24/2005#,#6/26/2005#) .set_CellValue(h1,1,3.19) h1 = .AddItem("Task 3") .AddBar(h1,"Task",#6/27/2005#,#6/29/2005#) .set_CellValue(h1,1,2) h1 = .AddItem("Task 4") .AddBar(h1,"Task",#6/30/2005#,#7/2/2005#) .set_CellValue(h1,1,1) End With .EndUpdate() End With |
1879 |
I am using Layout property to sort multiple columns at once. The problem is that all items get expanded. How do I prevent that
Dim h With Exg2antt1 .BeginUpdate() .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot With .Columns.Add("P1") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .PartialCheck = True End With With .Columns.Add("P2") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .PartialCheck = True .FormatColumn = "1 index ``" End With With .Items h = .AddItem("Root") .InsertItem(h,Nothing,"Child A") .InsertItem(h,Nothing,"Child B") .InsertItem(h,Nothing,"Child A") .InsertItem(h,Nothing,"Child B") .AddItem("Root") .AddItem("Root") End With .SingleSort = False .Layout = "multiplesort=""C0:1 C1:2"";collapse=""""" .EndUpdate() End With |
1878 |
How can I decode the Layout property
With Exg2antt1 .BeginUpdate() With .Columns .Add("C1") .Add("C2").Position = 1 End With With .Items .set_CellValue(.AddItem("SubItem 1.1"),1,"SubItem 1.2") .set_CellValue(.AddItem("SubItem 2.1"),1,"SubItem 2.2") End With .Columns.Item("C2").SortOrder = exontrol.EXG2ANTTLib.SortOrderEnum.SortDescending .EndUpdate() Debug.Print( "Encoded:" ) Debug.Print( .Layout ) ' Add 'exontrol.exprint.dll(ExPrint.dll)' reference to your project. With New exontrol.EXPRINTLib.exprint() Debug.Print( "Decoded: " ) Debug.Print( .get_Decode64TextW(Exg2antt1.Layout) ) End With End With |
1877 |
Is it possible to define a bar inside a bar (method 2)
Dim h With Exg2antt1 .BeginUpdate() .ScrollBySingleLine = True .Columns.Add("Task") .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exHLines .BackColorLevelHeader = .BackColor With .Chart .LevelCount = 2 .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exHLines .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exCreateBarAuto .AllowLinkBars = False .ResizeUnitScale = exontrol.EXG2ANTTLib.UnitEnum.exHour .set_PaneWidth(False,48) .FirstVisibleDate = #1/1/2001# .Bars.Item("Task").OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack End With With .Items h = .AddItem("Tasks") .AddBar(h,"Task",#1/3/2001#,#1/7/2001#,"A1") .AddBar(h,"Task",#1/4/2001#,#1/8/2001#,"A2") .AddBar(h,"Task",#1/9/2001#,#1/13/2001#,"A3") End With With .Chart.Notes With .Add("N1",Exg2antt1.Items.FirstVisibleItem,"A1","") .set_PartText(exontrol.EXG2ANTTLib.NotePartEnum.exNoteStart," ") .set_PartFixedWidth(exontrol.EXG2ANTTLib.NotePartEnum.exNoteStart,18) .set_PartFixedHeight(exontrol.EXG2ANTTLib.NotePartEnum.exNoteStart,11) .set_PartCanMove(exontrol.EXG2ANTTLib.NotePartEnum.exNoteStart,True) .set_PartBackColor(exontrol.EXG2ANTTLib.NotePartEnum.exNoteStart,Color.FromArgb(0,255,0)) .set_PartVisible(exontrol.EXG2ANTTLib.NotePartEnum.exNoteEnd,False) .ShowLink = exontrol.EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden .set_PartVOffset(exontrol.EXG2ANTTLib.NotePartEnum.exNoteStart,4) End With End With .EndUpdate() End With |
1876 |
Is it possible to define a bar inside a bar (method 1)
Dim h With Exg2antt1 .BeginUpdate() .ScrollBySingleLine = True .Columns.Add("Task") .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exHLines .BackColorLevelHeader = .BackColor With .Chart .LevelCount = 2 .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exHLines .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exCreateBarAuto .AllowLinkBars = False .ResizeUnitScale = exontrol.EXG2ANTTLib.UnitEnum.exHour .set_PaneWidth(False,48) .FirstVisibleDate = #1/1/2001# With .Bars.Item("Task") .OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidGroup = "Task,TaskB" End With With .Bars.Add("Aka") .Color = Color.FromArgb(0,255,0) .Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternSolid End With With .Bars.Add("Task%Aka") .Shortcut = "TaskB" .OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidGroup = "Task,TaskB" End With End With With .Items h = .AddItem("Tasks") .AddBar(h,"TaskB",#1/3/2001#,#1/7/2001#,"A1") .set_ItemBar(h,"A1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarPercent,0.25) .AddBar(h,"Task",#1/4/2001#,#1/8/2001#,"A2") .AddBar(h,"Task",#1/9/2001#,#1/13/2001#,"A3") End With .EndUpdate() End With |
1875 |
How do I show the bar with a solid color, no border (method 1)
Dim h With Exg2antt1 .BeginUpdate() .ScrollBySingleLine = True .Columns.Add("Task") .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exHLines .BackColorLevelHeader = .BackColor With .Chart .LevelCount = 2 .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exHLines .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exCreateBarAuto .AllowLinkBars = False .ResizeUnitScale = exontrol.EXG2ANTTLib.UnitEnum.exHour .set_PaneWidth(False,48) .FirstVisibleDate = #1/1/2001# With .Bars.Item("Task") .Color = Color.FromArgb(255,0,0) .Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternSolid End With End With With .Items h = .AddItem("Task") .AddBar(h,"Task",#1/2/2001#,#1/5/2001#,"") End With .EndUpdate() End With |
1874 |
How do I show the bar with a solid color, no border (method 2)
Dim h With Exg2antt1 .BeginUpdate() .ScrollBySingleLine = True .Columns.Add("Task") .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exHLines .BackColorLevelHeader = .BackColor With .Chart .LevelCount = 2 .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exHLines .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exCreateBarAuto .AllowLinkBars = False .ResizeUnitScale = exontrol.EXG2ANTTLib.UnitEnum.exHour .set_PaneWidth(False,48) .FirstVisibleDate = #1/1/2001# With .Bars.Item("Task") .Color = Color.FromArgb(255,0,0) .StartColor = .Color .EndColor = .Color .Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternBox End With End With With .Items h = .AddItem("Task") .AddBar(h,"Task",#1/2/2001#,#1/5/2001#,"") End With .EndUpdate() End With |
1873 |
How do I show the bar with a solid color, no border (method 3)
Dim h With Exg2antt1 .BeginUpdate() .ScrollBySingleLine = True .Columns.Add("Task") .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exHLines .BackColorLevelHeader = .BackColor With .Chart .LevelCount = 2 .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exHLines .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exCreateBarAuto .AllowLinkBars = False .ResizeUnitScale = exontrol.EXG2ANTTLib.UnitEnum.exHour .set_PaneWidth(False,48) .FirstVisibleDate = #1/1/2001# End With With .VisualAppearance .RenderType = &Hffffffffui .Add(1,"gBFLBCJwBAEHhEJAAEhABJkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyDQKkEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQiiCYsS5AcgPfKgAAFESNY5gSL5Y" & _ "j2IjrRDCMAggI") End With With .Chart.Bars.Item("Task") .Color32 = &H10000ff End With With .Items h = .AddItem("Task") .AddBar(h,"Task",#1/2/2001#,#1/5/2001#,"") End With .EndUpdate() End With |
1872 |
How do I find the cell's type, or what the cell holds
With Exg2antt1 .BeginUpdate() .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exRowLines .Chart.set_PaneWidth(True,0) With .Columns .Add("Value").Width = 24 .Add("Type").FormatColumn = "type(%0)" .Add("TypeAsString").FormatColumn = "(0 := type(%0)) array (`empty`, `null`, `short`, `long`, `float`, `double`, `currency`, `date`, `string`, `object`, `error`, `b" & _ "oolean`, `variant`, `any`, `reserved`, `decimal`, `char`, `byte`, `unsigned short`, `unsigned long`, `long on 64 bits`)" .Add("Length").FormatColumn = "len(%0)" End With With .Items .AddItem() .AddItem("") .set_CellValue(.AddItem(),0,Exg2antt1) .set_CellValue(.AddItem(),0,True) .set_CellValue(.AddItem(),0,-1) .set_CellValue(.AddItem(),0,-1) .set_CellValue(.AddItem(),0,#1/1/2001#) End With .EndUpdate() End With |
1871 |
Is it possible to allow changing the bar's parent while bar's start/end margins should stay unchanged
' BarParentChange event - Occurs just before moving a bar from current item to another item. Private Sub Exg2antt1_BarParentChange(ByVal sender As System.Object,ByVal Item As Integer,ByVal Key As Object,ByVal NewItem As Integer,ByRef Cancel As Boolean) Handles Exg2antt1.BarParentChange With Exg2antt1 .Items.set_SelectItem(NewItem,True) Debug.Print( "BarParentChange from " ) Debug.Print( .Items.get_CellCaption(Item,0) ) Debug.Print( " to " ) Debug.Print( .Items.get_CellCaption(NewItem,0) ) End With End Sub Dim h With Exg2antt1 .BeginUpdate() .Columns.Add("Members").set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) .SelBackMode = exontrol.EXG2ANTTLib.BackModeEnum.exTransparent With .Chart .SelBackColor = Exg2antt1.SelBackColor .FirstVisibleDate = #9/20/2006# .AllowLinkBars = False .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exNoCreateBar .LevelCount = 2 .set_PaneWidth(False,96) With .Bars.Item("Task") .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize,False) End With End With With .Items .AddItem("Member <b>1</b>") h = .AddItem("Member <b>2</b>") .AddBar(h,"Task",#9/21/2006#,#9/23/2006#,"T102","Task <b>102</b>") .set_ItemBar(h,"T102",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMove,False) .set_ItemBar(h,"T102",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMoveToAnother,True) .AddItem("Member <b>3</b>") .AddItem("Member <b>4</b>") End With .EndUpdate() End With |
1870 |
Is it possible to (un)highlight the day/night shifts
' Click event - Occurs when the user presses and then releases the left mouse button over the tree control. Private Sub Exg2antt1_Click(ByVal sender As System.Object) Handles Exg2antt1.Click With Exg2antt1 With .Chart .ShowNonworkingDates = False .ShowNonworkingHours = False .BackColor = Color.FromArgb(255,255,255) End With .Refresh() End With End Sub With Exg2antt1 .BeginUpdate() With .Chart .FirstVisibleDate = #1/1/2001# .LevelCount = 2 .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay .UnitWidth = 64 .set_PaneWidth(False,0) .NonworkingHours = 15728895 .NonworkingHoursPattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternSolid .NonworkingDaysPattern = .NonworkingHoursPattern .NonworkingHoursColor = Color.FromArgb(240,240,240) .NonworkingDaysColor = Color.FromArgb(212,212,212) .BackColor = Color.FromArgb(250,250,250) End With .EndUpdate() End With |
1869 |
How can I add a vertical line at specified date-time
With Exg2antt1 With .Chart .set_PaneWidth(False,18) .LevelCount = 2 .UnitWidth = 32 .FirstVisibleDate = #1/1/2010# .MarkTimeZone("M1",#1/5/2010#,#1/5/2010#,16711680,"50:5;3") .MarkTimeZone("M2",#1/6/2010#,#1/6/2010#,16711680,":5") .MarkTimeZone("M3",#1/7/2010 10:00:00 AM#,#1/7/2010 10:00:00 AM#,255,"50:3;;zone") End With End With |
1868 |
How do I clear all date-time zones
' Click event - Occurs when the user presses and then releases the left mouse button over the tree control. Private Sub Exg2antt1_Click(ByVal sender As System.Object) Handles Exg2antt1.Click With Exg2antt1 .Chart.RemoveTimeZone("<*>") End With End Sub ' RClick event - Fired when right mouse button is clicked Private Sub Exg2antt1_RClick(ByVal sender As System.Object) Handles Exg2antt1.RClick With Exg2antt1 .Chart.RemoveTimeZone("<Z*>") End With End Sub With Exg2antt1 With .Chart .set_PaneWidth(False,18) .LevelCount = 2 .FirstVisibleDate = #1/1/2010# .MarkTimeZone("Z1",#1/4/2010#,#1/5/2010#,255) .MarkTimeZone("Z2",#1/11/2010#,#1/12/2010#,65280) .MarkTimeZone("M1",#1/7/2010#,#1/8/2010#,16711680,"50:5;3") End With End With |
1867 |
How do I place a comment above/bellow the bar (sample 4)
Dim h With Exg2antt1 .BeginUpdate() .DefaultItemHeight = 26 .Columns.Add("Task") With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,64) With .Bars.Item("Task") .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarVAlignCaption,18) .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,0) .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption," ") .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,0) .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionVAlign,16) End With End With With .Items h = .AddItem("Task") .AddBar(h,"Task",#1/2/2001#,#1/6/2001#,"K1","<font ;6>user comment") .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"<font ;6>user comment") .AddBar(h,"Task",#1/9/2001#,#1/13/2001#,"K2","<font ;6>user comment") .set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"<font ;6>user comment") End With .EndUpdate() End With |
1866 |
How do I place a comment above/bellow the bar (sample 3)
Dim h With Exg2antt1 .BeginUpdate() .DefaultItemHeight = 26 .Columns.Add("Task") With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,64) End With With .Items h = .AddItem("Task") .AddBar(h,"Task",#1/2/2001#,#1/6/2001#,"K1","<font ;6>user comment") .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarVAlignCaption,18) .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,0) .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"<font ;6>user comment") .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,0) .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionVAlign,16) .AddBar(h,"Task",#1/9/2001#,#1/13/2001#,"K2","<font ;6>user comment") .set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"<font ;6>user comment") End With .EndUpdate() End With |
1865 |
How do I place a comment under the bar (sample 2)
Dim h With Exg2antt1 .BeginUpdate() .DefaultItemHeight = 26 .Columns.Add("Task") With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,64) With .Bars.Item("Task") .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarVAlignCaption,18) .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,0) End With End With With .Items h = .AddItem("Task") .AddBar(h,"Task",#1/2/2001#,#1/6/2001#,"K1","<font ;6>user comment") .AddBar(h,"Task",#1/9/2001#,#1/13/2001#,"K2","<font ;6>user comment") End With .EndUpdate() End With |
1864 |
How do I place a comment under the bar (sample 1)
Dim h With Exg2antt1 .BeginUpdate() .DefaultItemHeight = 26 .Columns.Add("Task") With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,64) End With With .Items h = .AddItem("Task") .AddBar(h,"Task",#1/2/2001#,#1/6/2001#,"K1","<font ;6>user comment") .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarVAlignCaption,18) .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,0) .AddBar(h,"Task",#1/9/2001#,#1/13/2001#,"K2","<font ;6>user comment") End With .EndUpdate() End With |
1863 |
I am using exBarCanMoveToAnother to allow a bar to be moved from one item to another. The question is if it is possible somehow to highlight the current bar can be dropped to (sample 2)
' BarParentChange event - Occurs just before moving a bar from current item to another item. Private Sub Exg2antt1_BarParentChange(ByVal sender As System.Object,ByVal Item As Integer,ByVal Key As Object,ByVal NewItem As Integer,ByRef Cancel As Boolean) Handles Exg2antt1.BarParentChange With Exg2antt1 .Items.set_SelectItem(NewItem,True) Cancel = .ConditionalFormats.Item("NOTRED").get_Verify(NewItem) End With End Sub ' ChartEndChanging event - Occurs after the chart has been changed. Private Sub Exg2antt1_ChartEndChanging(ByVal sender As System.Object,ByVal Operation As exontrol.EXG2ANTTLib.BarOperationEnum) Handles Exg2antt1.ChartEndChanging With Exg2antt1 .SelForeColor32 = &H8000000e .SelBackColor32 = &H8000000d .Chart.SelBackColor = Exg2antt1.SelBackColor .ConditionalFormats.Clear() End With End Sub ' ChartStartChanging event - Occurs when the chart is about to be changed. Private Sub Exg2antt1_ChartStartChanging(ByVal sender As System.Object,ByVal Operation As exontrol.EXG2ANTTLib.BarOperationEnum) Handles Exg2antt1.ChartStartChanging With Exg2antt1 .SelForeColor = .ForeColor .SelBackColor = .BackColor With .Chart .SelBackColor = .BackColor End With With .ConditionalFormats.Add("%0 contains `Allowed` ","RED") .Enabled = False End With With .ConditionalFormats.Add("not ( %0 contains `Allowed` )","NOTRED") .BackColor32 = &H1fefefe .ChartBackColor = .BackColor End With End With End Sub Dim h With Exg2antt1 .BeginUpdate() .VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABZkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyDQKkEwsACEIrjKCRShyCYZRrGUgRCKQahLEiTIhGUYJHgmK4tRoAUbyDBIGQSCCZYDmKA3f" & _ "j0AI9P7FcgSABEEigNIxToOU4jFgeCR2TqQRK1BDQbQSFCaZrmMKIXICO40WBQFhTdLlRyBBKzLKtCyaBqWaZrWxZE72ZaFVTdOK6bDvGwoarid56X7beA2PgdZTjQi5" & _ "cCxG5sLrTBZtYzfET3diOEYPQzHMpzDB7bxbGaXZBlGSZbjeGZBUjQc7yfSNMw/HqKZQ6cQwTAIgI") .Columns.Add("Members").set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) With .Chart .SelBackColor = Exg2antt1.SelBackColor .FirstVisibleDate = #9/20/2006# .AllowLinkBars = False .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exNoCreateBar .AllowSelectObjects = exontrol.EXG2ANTTLib.SelectObjectsEnum.exNoSelectObjects .LevelCount = 2 .set_PaneWidth(False,96) .Bars.Item("Task").OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack End With With .Items h = .AddItem("Member <b>1</b>") h = .AddItem("Member <b>Allowed</b>") .AddBar(h,"Task",#9/21/2006#,#9/23/2006#,"T102","Task <b>102</b>") .set_ItemBar(h,"T102",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .set_ItemBar(h,"T102",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMoveToAnother,True) h = .AddItem("Member <b>Allowed</b>") h = .AddItem("Member <b>4</b>") End With .EndUpdate() End With |
1862 |
I am using exBarCanMoveToAnother to allow a bar to be moved from one item to another. The question is if it is possible somehow to highlight the current bar can be dropped to (sample 1)
' BarParentChange event - Occurs just before moving a bar from current item to another item. Private Sub Exg2antt1_BarParentChange(ByVal sender As System.Object,ByVal Item As Integer,ByVal Key As Object,ByVal NewItem As Integer,ByRef Cancel As Boolean) Handles Exg2antt1.BarParentChange With Exg2antt1 .Items.set_SelectItem(NewItem,True) Cancel = .ConditionalFormats.Item("NOTRED").get_Verify(NewItem) End With End Sub ' ChartEndChanging event - Occurs after the chart has been changed. Private Sub Exg2antt1_ChartEndChanging(ByVal sender As System.Object,ByVal Operation As exontrol.EXG2ANTTLib.BarOperationEnum) Handles Exg2antt1.ChartEndChanging With Exg2antt1 .SelForeColor32 = &H8000000e .SelBackColor32 = &H8000000d .Chart.SelBackColor = Exg2antt1.SelBackColor .ConditionalFormats.Clear() End With End Sub ' ChartStartChanging event - Occurs when the chart is about to be changed. Private Sub Exg2antt1_ChartStartChanging(ByVal sender As System.Object,ByVal Operation As exontrol.EXG2ANTTLib.BarOperationEnum) Handles Exg2antt1.ChartStartChanging With Exg2antt1 .SelForeColor = .ForeColor .SelBackColor = .BackColor With .Chart .SelBackColor = .BackColor End With With .ConditionalFormats.Add("%0 contains `Allowed` ","RED") .BackColor = Color.FromArgb(255,128,128) .ChartBackColor = .BackColor End With With .ConditionalFormats.Add("not ( %0 contains `Allowed` )","NOTRED") .Enabled = False End With End With End Sub Dim h With Exg2antt1 .BeginUpdate() .Columns.Add("Members").set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) With .Chart .SelBackColor = Exg2antt1.SelBackColor .FirstVisibleDate = #9/20/2006# .AllowLinkBars = False .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exNoCreateBar .AllowSelectObjects = exontrol.EXG2ANTTLib.SelectObjectsEnum.exNoSelectObjects .LevelCount = 2 .set_PaneWidth(False,96) .Bars.Item("Task").OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack End With With .Items h = .AddItem("Member <b>1</b>") h = .AddItem("Member <b>Allowed</b>") .AddBar(h,"Task",#9/21/2006#,#9/23/2006#,"T102","Task <b>102</b>") .set_ItemBar(h,"T102",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .set_ItemBar(h,"T102",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMoveToAnother,True) h = .AddItem("Member <b>Allowed</b>") h = .AddItem("Member <b>4</b>") End With .EndUpdate() End With |
1861 |
How can I check, if a specified item fits a specified conditional format expression
' AddItem event - Occurs after a new Item has been inserted to Items collection. Private Sub Exg2antt1_AddItem(ByVal sender As System.Object,ByVal Item As Integer) Handles Exg2antt1.AddItem With Exg2antt1 With .Items .AddBar(Item,"Task",.get_CellValue(Item,2),.get_CellValue(Item,4)) End With End With End Sub ' MouseMove event - Occurs when the user moves the mouse. Private Sub Exg2antt1_MouseMoveEvent(ByVal sender As System.Object,ByVal Button As Short,ByVal Shift As Short,ByVal X As Integer,ByVal Y As Integer) Handles Exg2antt1.MouseMoveEvent Dim c,h,hit With Exg2antt1 h = .get_ItemFromPoint(-1,-1,c,hit) Debug.Print( .ConditionalFormats.Item("RED").get_Verify(h) ) End With End Sub Dim rs With Exg2antt1 .BeginUpdate() With .Chart .FirstVisibleDate = #8/3/1994# .set_PaneWidth(False,256) .LevelCount = 2 .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay .FirstWeekDay = exontrol.EXG2ANTTLib.WeekDayEnum.exMonday End With .Chart.SelBackColor = Exg2antt1.SelBackColor .SelBackMode = exontrol.EXG2ANTTLib.BackModeEnum.exTransparent .ColumnAutoResize = False .ContinueColumnScroll = False rs = New ADODB.Recordset() With rs .Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) End With .DataSource = rs .Items.AllowCellValueToItemBar = True .Columns.Item(2).set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1) .Columns.Item(4).set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2) With .ConditionalFormats With .Add("%1 = 5","RED") .BackColor = Color.FromArgb(255,128,128) .ChartBackColor = .BackColor End With End With .EndUpdate() End With |
1860 |
Is it possible to apply the conditional format on the items shown on the chart part of the control (sample 3)
' AddItem event - Occurs after a new Item has been inserted to Items collection. Private Sub Exg2antt1_AddItem(ByVal sender As System.Object,ByVal Item As Integer) Handles Exg2antt1.AddItem With Exg2antt1 With .Items .AddBar(Item,"Task",.get_CellValue(Item,2),.get_CellValue(Item,4)) End With End With End Sub Dim rs With Exg2antt1 .BeginUpdate() .SelBackMode = exontrol.EXG2ANTTLib.BackModeEnum.exTransparent With .Chart .SelBackColor = Exg2antt1.SelBackColor .FirstVisibleDate = #8/3/1994# .set_PaneWidth(False,256) .LevelCount = 2 .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay .FirstWeekDay = exontrol.EXG2ANTTLib.WeekDayEnum.exMonday End With .ColumnAutoResize = False .ContinueColumnScroll = False rs = New ADODB.Recordset() With rs .Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) End With .DataSource = rs .Items.AllowCellValueToItemBar = True .Columns.Item(2).set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1) .Columns.Item(4).set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2) With .ConditionalFormats With .Add("%1 in (3,5)") .ApplyToBars = "Task" .BarColor = Color.FromArgb(255,0,0) .BarOverviewColor = Color.FromArgb(255,0,0) .ForeColor = .BarColor .Bold = True End With End With .EndUpdate() End With |
1859 |
Is it possible to apply the conditional format on the items shown on the chart part of the control (sample 2)
' AddItem event - Occurs after a new Item has been inserted to Items collection. Private Sub Exg2antt1_AddItem(ByVal sender As System.Object,ByVal Item As Integer) Handles Exg2antt1.AddItem With Exg2antt1 With .Items .AddBar(Item,"Task",.get_CellValue(Item,2),.get_CellValue(Item,4)) End With End With End Sub Dim rs With Exg2antt1 .BeginUpdate() .SelBackMode = exontrol.EXG2ANTTLib.BackModeEnum.exTransparent With .Chart .SelBackColor = Exg2antt1.SelBackColor .FirstVisibleDate = #8/3/1994# .set_PaneWidth(False,256) .LevelCount = 2 .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay .FirstWeekDay = exontrol.EXG2ANTTLib.WeekDayEnum.exMonday End With .ColumnAutoResize = False .ContinueColumnScroll = False rs = New ADODB.Recordset() With rs .Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) End With .DataSource = rs .Items.AllowCellValueToItemBar = True .Columns.Item(2).set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1) .Columns.Item(4).set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2) With .ConditionalFormats With .Add("%1 in (3,5)") .ApplyTo = &H1 .BackColor = Color.FromArgb(255,128,128) End With With .Add("%1 in (3,5)") .ApplyToBars = "Task" .BarColor = Color.FromArgb(255,0,0) .BarOverviewColor = Color.FromArgb(255,0,0) .ChartBackColor = Color.FromArgb(255,128,128) End With End With .EndUpdate() End With |
1858 |
Is it possible to apply the conditional format on the items shown on the chart part of the control (sample 1)
' AddItem event - Occurs after a new Item has been inserted to Items collection. Private Sub Exg2antt1_AddItem(ByVal sender As System.Object,ByVal Item As Integer) Handles Exg2antt1.AddItem With Exg2antt1 With .Items .AddBar(Item,"Task",.get_CellValue(Item,2),.get_CellValue(Item,4)) End With End With End Sub Dim rs With Exg2antt1 .BeginUpdate() With .Chart .FirstVisibleDate = #8/3/1994# .set_PaneWidth(False,256) .LevelCount = 2 .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay .FirstWeekDay = exontrol.EXG2ANTTLib.WeekDayEnum.exMonday End With .SelBackMode = exontrol.EXG2ANTTLib.BackModeEnum.exTransparent .BackColorAlternate = Color.FromArgb(240,240,240) .ColumnAutoResize = False .ContinueColumnScroll = False rs = New ADODB.Recordset() With rs .Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) End With .Chart.SelBackColor = Exg2antt1.SelBackColor .DataSource = rs .Items.AllowCellValueToItemBar = True .Columns.Item(2).set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1) .Columns.Item(4).set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2) With .ConditionalFormats With .Add("%1 in (3,5)") .ApplyToBars = "Task" .BarColor = Color.FromArgb(255,0,0) .BarOverviewColor = Color.FromArgb(255,0,0) .BackColor = Color.FromArgb(255,128,128) .ChartBackColor = Color.FromArgb(255,128,128) End With End With .EndUpdate() End With |
1857 |
How can I get ride / hide the image being dragged by OLE Drag and Drop
// OLEStartDrag event is not supported. Use the DragEnter,DragLeave,DragOver, DragDrop ... events. Dim h With Exg2antt1 .OLEDropMode = exontrol.EXG2ANTTLib.exOLEDropModeEnum.exOLEDropManual .set_Background(exontrol.EXG2ANTTLib.BackgroundPartEnum.exDragDropAfter,Color.FromArgb(255,255,255)) .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot .Columns.Add("Default") With .Items h = .AddItem("Root") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .set_ExpandItem(h,True) End With End With |
1856 |
How do I change the visual appearance of the split bars
Dim h With Exg2antt1 .BeginUpdate() .DefaultItemHeight = 24 With .VisualAppearance .Add(1,"gBFLBCJwBAEHhEJAAEhABEgDg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGMYhTgmFgAQhFcZQSB0Eg1BKMYwjOJgFgmEQxDQNIBQSLIYQiGSWZBGUBJDjWGgyQjOEByD" & _ "IMRwjE6UZBgeCRViEMo9RrSEZSLAdGRFAaVYDdULBEACU5VRZQFCwTQcBhpIyoZpkECobh2TYgQjYNT1NSkLxeGoSbbuGhBQrOAw1XTEMhyDR0LTJM6bMBACqrBi2L4x" & _ "URfOBRXLQAYbHjAZ7rSgacjKRpKRbmAV4Oh+O5pQjadp1TidNwHLoAK7nGwbbgmfwAZrAdjABj1HgBNS2dDkaabQrKEZ4XYAHAXVROOQTWIANb2XC4bwSLAwTJJYzjTh" & _ "iC2GInFOOQckiVw6AeCIvHSBzkCwDxfE6WZ2jsehICadx5kGYZdDgMRrA2c4NmWY56jyGxgEQJIgGkGJHEGVByBkWoCjkNAAAQIQ2AYRoDGQJAoKuZYgBgRZHggHZqAk" & _ "AZDjYGA7E8KB0kyB5LiiBgigiYhIgiQ4Jk4WIkn6CphjQDgbDmIwDBIMg3GMQ4uDaDZjgiZg6DIY5DGIPg/GQBAMneEJMFkFJqhGTppCYSoSmSSQ2EoPJlAMIhSDmZRE" & _ "AyVYVk0eRkm+FpkmkdhehaTp4iSZQxiYRAODIMQODmJJxhqTwJjYbobmcCZGHKGxLjmVQDC+J4DiYeg8GGWYuH6H5oAoBoCgcTwimaBodmeGZongPRPCoCoOiOZ5qBII" & _ "oiAuaZomkPoPGOToEiaaZKHaHYfiUA5OhMAAngoVh6iYKYqHqKoqmGWoGiOKRkHOKJ7D2TxKgaNotmuCpmFAPQrkqPh4iwaw6laOowmwOpwnSL4LmiXJ9D4TxbBqTozm" & _ "0CxGjwPRtEsIJsjWT4Dlydo1C2Sx2l6N5uAOWpijIDpbhYQ42i4K4mmqOpukuMpnjIJIjmKco5m8S5WnaPZkDuSJ4h0S46FKcY8m+DAHAGPovkoUhgD4cILmsCpCnCTA" & _ "2nKQgPhwFokh4JpjmsFpEDGDBnBqRpwgwWJ6kSKhZjie5FnGTIXCWR4yAmYh+D+D48g8HpLnMDJHDIPoylObwpWIY5/CyTJzkydw1kSIhzA6ZQ7E+fJrDWUZ0g0JxKks" & _ "T5NDSPJTmUaRcmAN5Nn0FJ/lMdYNGcWpWnWHRaGAMZ2AQDoEDKNhLicVpViQDYnGqWpPl2HxFDQNwJgoLoGGaCcDInRdjMCuNYbovR2D2FyNgNIcAJC5FWKwNwcBqAzC" & _ "WBoPgTA8BkEwFwN4HRjjyAMH8EgcQ5CaGIFoAAHQ3AgAAIAQBAQ==") .Add(2,"gBFLBCJwBAEHhEJAAEhABBYDg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGMYhTgmFgAQhFcZQSB0Eg1BKMYwjOJgFgmEQxDQNIBQSLIYQiGSWZTgMYRSASI43RoMUIzV" & _ "AcQxDEaIZLlGQYHgkNIhDJPcZ0VDUbQGBiQIRmIAHNBwJJUVZFdBDLQkQy5HapZDkECobA+CZQTzUUI1LS9WS1HYaRJle4YRDUMJyQjdV4TRINHQvMinYzqOzrOhaW5T" & _ "SzLcqyCK0SxxR4AJ4yGobJjiQYJShXcxyDQ8dyZC7PQohG7ofxUAKDVjhMjZRQeMS9JCwaThHElRQHMyBdJkKA9Iq2WaGXBeeQ3JbNbzrYzHb5hHZgAzTOoWbzWFT8BJ" & _ "OFOCAYGcJJjHGTh+C2H40AAL5ckyBQDFkKoWHYLw9iGTpGDUY4zkIdwbF8JhbgMc5hF6OJ8C6BhTkOcBAlsR4NnQaAflAIQJBQBoRgwdAdEcIYVEUQJBGYOBCBMYQUGg" & _ "NhCEKB5FB4VBBgQXJgF+IAzA4Ig5GIQIQBwOxiGiIgngoYpIi4LoKiMA5KDIMwjEKakmk6OJkkmDpNgidgtgwI55AYJw5iQQwSEYNxkgiZJrEITppDSc4TkyCREmeFJk" & _ "CkAkLmWAwWFoOolkkNheDuJJJDSb4YmIQ4UkaGZlFkVJVhqTR5jYYw7mWeQ1AkPAnEmVh1C6Z4JiYL4KGQYwQmOH5PBoBh2h0EIaAaBg8GMI5Ij6IpokoNoOiOaJDiaE" & _ "oiA8KgegGIRpGoZoaiaaZDmCdYlGkZAmgmKJqEqFomimaoKCaIoqGqSo2iwQhknqRoyiyaxKlaNotk8OpCjiLprkqbQJD0LALAaQowmwSwWkaMZQhOVpKjKbJLDaTozm" & _ "0CxFAkPYtEsVpWjWbYLGaWo2lCGRil6N5pAuBpiDsbhLH6Zo3G4ax6HhYgpFibYjCWa4ml4QhPguVp2D4b4Li6bYPmiSZWngPhvGuWQJj+b5zmsBo+iePAmDCIwoGwGJ" & _ "6kEL4MA8EJDjCC46FWQwoBObwGkQD4UCcDpDg+PIHBWPpiHwYJxD+MgcH8BpH4cBJ7kicIrnKC4hg+fIjCoPoQhyOwuD8M5CnMPpJCMCIIkOOQOlOfw1k6MnJDwPw0GO" & _ "fhvDGdQNAIKdalOAJfDedJdC8SxCeyNJQleZhdEoJ4iEyLYWlWVx0GQJJslqTQtjcVJYi6aZ8mMM43EmFwCECJkfYyWiDuAuG0EgdBNB8AYHYMgxwEM1EAIAgIA==") .Add(3,"CP:2 -2 -2 2 2") End With .Columns.Add("Task") With .Chart .LevelCount = 2 .set_PaneWidth(False,48) .FirstVisibleDate = #1/1/2001# With .Bars With .Add("A") .Height = 15 .Color32 = &H2000000 .Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternBDiagonal End With With .Add("Task:A") .Shortcut = "Task" .Height = 15 .Color32 = &H1000000 .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,True) End With End With .NonworkingDaysColor = Color.FromArgb(240,240,240) .SelBarColor = Color.FromArgb(0,0,255) End With With .Items .AddBar(.AddItem("Task 1"),"Task",#1/2/2001#,#1/16/2001#) h = .AddItem("Task 2") .AddBar(h,"Task",#1/2/2001#,#1/16/2001#,"") .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,65535) h = .AddItem("Task 3") .AddBar(h,"Task",#1/2/2001#,#1/16/2001#,"") .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected,True) h = .AddItem("Task 4") .AddBar(h,"Task",#1/2/2001#,#1/16/2001#,"") .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarNonWorkingColor,58753152) h = .AddItem("Task 5") .AddBar(h,"Task",#1/2/2001#,#1/16/2001#,"") .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarNonWorkingColor,25198720) h = .AddItem("Task 6") .AddBar(h,"Task",#1/2/2001#,#1/16/2001#,"") .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarNonWorkingColor,2130771712) End With .EndUpdate() End With |
1855 |
Is there a way to display automatically the duration ( days, hours, minutes ) of the bar next to it
With Exg2antt1 .BeginUpdate() With .Columns.Add("Tasks") .AllowSizing = False .Width = 36 End With .BackColorLevelHeader = .BackColor With .Chart .set_PaneWidth(False,64) .FirstVisibleDate = #4/6/2009# .LevelCount = 2 With .Bars.Add("Task:Progress") .Shortcut = "TaskS" .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"<%=((1:=int(0:= (%258))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != " & _ "0 ? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')%>") End With .ResizeUnitScale = exontrol.EXG2ANTTLib.UnitEnum.exMinute End With With .Items .AddBar(.AddItem("T1"),"TaskS",#4/10/2009 2:30:00 AM#,#4/16/2009 2:30:00 AM#) .AddBar(.AddItem("T2"),"TaskS",#4/14/2009 9:00:00 AM#,#4/22/2009 10:10:00 AM#) .set_ItemBar(0,"<*>",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,True) .set_ItemBar(0,"<*>",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) End With .EndUpdate() End With |
1854 |
Is there a way to display automatically the duration ( days, hours, minutes ) of the bar next to it
With Exg2antt1 .BeginUpdate() With .Columns.Add("Tasks") .AllowSizing = False .Width = 36 End With .BackColorLevelHeader = .BackColor With .Chart .set_PaneWidth(False,64) .FirstVisibleDate = #4/6/2009# .LevelCount = 2 .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exHour .ResizeUnitScale = exontrol.EXG2ANTTLib.UnitEnum.exMinute .Bars.Item("Task").set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"<%=((1:=int(0:= (%513))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != " & _ "0 ? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')%>") End With With .Items .AddBar(.AddItem("T1"),"Task",#4/6/2009 2:30:00 AM#,#4/6/2009 0:35:00 PM#) .AddBar(.AddItem("T2"),"Task",#4/6/2009 9:00:00 AM#,#4/6/2009 10:10:00 AM#) .set_ItemBar(0,"<*>",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) End With .EndUpdate() End With |
1853 |
Does it support single or multiple split pane views
Dim hSummary,hTask With Exg2antt1 .BeginUpdate() .Columns.Add("Task") .set_Background(exontrol.EXG2ANTTLib.BackgroundPartEnum.exSplitBar,Color.FromArgb(128,128,128)) .set_Background(exontrol.EXG2ANTTLib.BackgroundPartEnum.exCSplitBar,Color.FromArgb(40,40,40)) With .Chart .LevelCount = 2 .set_PaneWidth(False,76) .FirstVisibleDate = #1/1/2001# With .Bars.Item("Summary") .Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternShadow .Shape = exontrol.EXG2ANTTLib.ShapeBarEnum.exShapeSolidDown .Color = Color.FromArgb(0,0,255) .StartColor = .Color .EndColor = .Color End With .AllowSplitPane = exontrol.EXG2ANTTLib.AllowSplitPaneEnum.exAllowTwoSplitPane Or exontrol.EXG2ANTTLib.AllowSplitPaneEnum.exAllowOneSplitPane .SplitPaneWidth = "128,128" End With With .Items hSummary = .AddItem("Summary") .AddBar(hSummary,"Summary",#1/2/2001#,#1/2/2001#,"") hTask = .InsertItem(hSummary,Nothing,"Task A") .AddBar(hTask,"Task",#1/2/2001#,#1/5/2001#,"K1") hTask = .InsertItem(hSummary,Nothing,"Task B") .AddBar(hTask,"Task",#1/4/2001#,#1/8/2001#,"K2") hTask = .InsertItem(hSummary,Nothing,"Task C") .AddBar(hTask,"Task",#2/23/2001#,#2/27/2001#,"K3") .set_ExpandItem(hSummary,True) .DefineSummaryBars(hSummary,"",-1,"<*>") End With .EndUpdate() End With |
1852 |
How can I programmatically add more split panes ( by code)
Dim hSummary,hTask With Exg2antt1 .BeginUpdate() .Columns.Add("Task") .set_Background(exontrol.EXG2ANTTLib.BackgroundPartEnum.exSplitBar,Color.FromArgb(128,128,128)) With .Chart .LevelCount = 2 .set_PaneWidth(False,76) .FirstVisibleDate = #1/1/2001# With .Bars.Item("Summary") .Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternShadow .Shape = exontrol.EXG2ANTTLib.ShapeBarEnum.exShapeSolidDown .Color = Color.FromArgb(0,0,255) .StartColor = .Color .EndColor = .Color End With .AllowSplitPane = exontrol.EXG2ANTTLib.AllowSplitPaneEnum.exAllowOneSplitPane End With With .Items hSummary = .AddItem("Summary") .AddBar(hSummary,"Summary",#1/2/2001#,#1/2/2001#,"") hTask = .InsertItem(hSummary,Nothing,"Task A") .AddBar(hTask,"Task",#1/2/2001#,#1/5/2001#,"K1") hTask = .InsertItem(hSummary,Nothing,"Task B") .AddBar(hTask,"Task",#1/4/2001#,#1/8/2001#,"K2") hTask = .InsertItem(hSummary,Nothing,"Task C") .AddBar(hTask,"Task",#2/23/2001#,#2/27/2001#,"K3") .set_ExpandItem(hSummary,True) .DefineSummaryBars(hSummary,"",-1,"<*>") End With With .Chart .ScrollTo(.EndPrintDate,1) .SplitPaneWidth = "128,128,128" .ScrollTo(.StartPrintDate,1) End With .EndUpdate() End With |
1851 |
How can I programmatically add a split pane, or adding a split view at runtime
Dim hSummary,hTask With Exg2antt1 .BeginUpdate() .Columns.Add("Task") .set_Background(exontrol.EXG2ANTTLib.BackgroundPartEnum.exCSplitBar,Color.FromArgb(40,40,40)) With .Chart .LevelCount = 2 .set_PaneWidth(False,76) .FirstVisibleDate = #1/1/2001# With .Bars.Item("Summary") .Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternShadow .Shape = exontrol.EXG2ANTTLib.ShapeBarEnum.exShapeSolidDown .Color = Color.FromArgb(0,0,255) .StartColor = .Color .EndColor = .Color End With .AllowSplitPane = exontrol.EXG2ANTTLib.AllowSplitPaneEnum.exAllowOneSplitPane End With With .Items hSummary = .AddItem("Summary") .AddBar(hSummary,"Summary",#1/2/2001#,#1/2/2001#,"") hTask = .InsertItem(hSummary,Nothing,"Task A") .AddBar(hTask,"Task",#1/2/2001#,#1/5/2001#,"K1") hTask = .InsertItem(hSummary,Nothing,"Task B") .AddBar(hTask,"Task",#1/4/2001#,#1/8/2001#,"K2") hTask = .InsertItem(hSummary,Nothing,"Task C") .AddBar(hTask,"Task",#2/23/2001#,#2/27/2001#,"K3") .set_ExpandItem(hSummary,True) .DefineSummaryBars(hSummary,"",-1,"<*>") End With With .Chart .ScrollTo(.EndPrintDate,1) .SplitPaneWidth = "128" .ScrollTo(.StartPrintDate,1) End With .EndUpdate() End With |
1850 |
Is there any way, property, procedure or anything else to split the control into multiple views
Dim hSummary,hTask With Exg2antt1 .BeginUpdate() .Columns.Add("Task") .set_Background(exontrol.EXG2ANTTLib.BackgroundPartEnum.exCSplitBar,Color.FromArgb(40,40,40)) With .Chart .LevelCount = 2 .set_PaneWidth(False,76) .FirstVisibleDate = #1/1/2001# With .Bars.Item("Summary") .Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternShadow .Shape = exontrol.EXG2ANTTLib.ShapeBarEnum.exShapeSolidDown .Color = Color.FromArgb(0,0,255) .StartColor = .Color .EndColor = .Color End With .AllowSplitPane = exontrol.EXG2ANTTLib.AllowSplitPaneEnum.exAllowOneSplitPane End With With .Items hSummary = .AddItem("Summary") .AddBar(hSummary,"Summary",#1/2/2001#,#1/2/2001#,"") hTask = .InsertItem(hSummary,Nothing,"Task A") .AddBar(hTask,"Task",#1/2/2001#,#1/5/2001#,"K1") hTask = .InsertItem(hSummary,Nothing,"Task B") .AddBar(hTask,"Task",#1/4/2001#,#1/8/2001#,"K2") hTask = .InsertItem(hSummary,Nothing,"Task C") .AddBar(hTask,"Task",#2/23/2001#,#2/27/2001#,"K3") .set_ExpandItem(hSummary,True) .DefineSummaryBars(hSummary,"",-1,"<*>") End With .EndUpdate() End With |
1849 |
It appears that I can not use the ItemFromPoint property in my environment. What else I can do
' MouseMove event - Occurs when the user moves the mouse. Private Sub Exg2antt1_MouseMoveEvent(ByVal sender As System.Object,ByVal Button As Short,ByVal Shift As Short,ByVal X As Integer,ByVal Y As Integer) Handles Exg2antt1.MouseMoveEvent With Exg2antt1 Debug.Print( .ExecuteTemplate("Dim c, hit; ItemFromPoint(-1,-1, c, hit )") ) End With End Sub Dim h With Exg2antt1 .BeginUpdate() With .Columns.Add("Default") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .PartialCheck = True End With .Chart.set_PaneWidth(True,0) With .Items h = .AddItem("Root 1") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .set_ExpandItem(h,True) h = .AddItem("Root 2") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .set_ExpandItem(h,True) End With .EndUpdate() End With |
1848 |
How can I change the color for selected links (ebn)
Dim h1,h2,h3 With Exg2antt1 .BeginUpdate() With .VisualAppearance .RenderType = &Hfffffffeui .Add(1,"gBFLBCJwBAEHhEJAEGg4BNkMQAAYAQGKIYBkAKBQAGaAoDDYNQwQwAAwjIKEEwsACEIrjKCVIgkHYJRjGEZxMAsEwjAoaQChEZRUhEMgxDDIIxAJIcaw0GSEZwgOQZB" & _ "iOEYnDANMgzDLMZR7DajYymSA6LiKNo+QjKFB0NLMVRtEIIIzCSCaNomT4DS4NIi2DYcVhhMqBYbtCZZBo2FpZUxXdL0BJMVxbHKYJikW4pVjoAJ+TxccjVDQNJyLQ6r" & _ "YzuAAKNpuO58RbdGDQHA9KyfLCEcTxYAMbp6X5kaBZVp2VCMRzbTLUIDzPNVCTrNIaJioAaMeiCG5NUzieqRNalLABFjZMIHDbtGynDIJZruW52+CLIZpWbEOiRXr2Tx" & _ "xgGYp5Fie5mAYBgIgSFDrDOIZUmQZYiECXJUjIEQ3lUGgbEIRQcg+Hg8DEFxYFuOR/i+X5znufh/omBgCgCVwjn4BoBmCCAmAqApgkefgMgOYQID4DoELsUgTgUYYIC4" & _ "F4GGGSAaBuBxhhgfgggUYgog4EYJGIaBJn6ChiBiLgsgkIpoj4J4BCMSJWDaDZjgiZgCEAQCAgA==") .Add(2,"CP:1 -2 -2 2 2") End With .DefaultItemHeight = 24 .Columns.Add("Task") With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,48) .NonworkingDays = 0 .LinksStyle = exontrol.EXG2ANTTLib.LinkStyleEnum.exLinkSolid .LinksWidth = 2 .SelLinkColor32 = &H20000ff End With With .Items h1 = .AddItem("Task 1") .AddBar(h1,"Task",#1/2/2001#,#1/4/2001#,"") h2 = .AddItem("Task 2") .AddBar(h2,"Task",#1/2/2001#,#1/4/2001#,"") .AddLink("L1",h1,"",h2,"") .set_Link("L1",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkSelected,True) h3 = .AddItem("Task 3") .AddBar(h3,"Task",#1/2/2001#,#1/4/2001#,"") .AddLink("L2",h2,"",h3,"") .SchedulePDM(0,"") End With .EndUpdate() End With |
1847 |
How can I change the color for selected links (color, no frame)
Dim h1,h2,h3 With Exg2antt1 .BeginUpdate() .DefaultItemHeight = 24 .Columns.Add("Task") With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,48) .NonworkingDays = 0 .LinksStyle = exontrol.EXG2ANTTLib.LinkStyleEnum.exLinkSolid .LinksWidth = 2 .SelLinkColor32 = &H7f0000ff End With With .Items h1 = .AddItem("Task 1") .AddBar(h1,"Task",#1/2/2001#,#1/4/2001#,"") h2 = .AddItem("Task 2") .AddBar(h2,"Task",#1/2/2001#,#1/4/2001#,"") .AddLink("L1",h1,"",h2,"") .set_Link("L1",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkSelected,True) h3 = .AddItem("Task 3") .AddBar(h3,"Task",#1/2/2001#,#1/4/2001#,"") .AddLink("L2",h2,"",h3,"") .SchedulePDM(0,"") End With .EndUpdate() End With |
1846 |
How can I change the color for selected links (color, frame)
Dim h1,h2,h3 With Exg2antt1 .BeginUpdate() .DefaultItemHeight = 24 .Columns.Add("Task") With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,48) .NonworkingDays = 0 .LinksStyle = exontrol.EXG2ANTTLib.LinkStyleEnum.exLinkSolid .LinksWidth = 2 .SelLinkColor = Color.FromArgb(255,0,0) End With With .Items h1 = .AddItem("Task 1") .AddBar(h1,"Task",#1/2/2001#,#1/4/2001#,"") h2 = .AddItem("Task 2") .AddBar(h2,"Task",#1/2/2001#,#1/4/2001#,"") .AddLink("L1",h1,"",h2,"") .set_Link("L1",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkSelected,True) h3 = .AddItem("Task 3") .AddBar(h3,"Task",#1/2/2001#,#1/4/2001#,"") .AddLink("L2",h2,"",h3,"") .SchedulePDM(0,"") End With .EndUpdate() End With |
1845 |
By default, the bar gets selected once the user releases the button of the mouse. Is it possible to change this behavior so the bar gets selected once the user presses the button of the mouse
' MouseDown event - Occurs when the user presses a mouse button. Private Sub Exg2antt1_MouseDownEvent(ByVal sender As System.Object,ByVal Button As Short,ByVal Shift As Short,ByVal X As Integer,ByVal Y As Integer) Handles Exg2antt1.MouseDownEvent Dim b,c,h,hit With Exg2antt1 h = .get_ItemFromPoint(-1,-1,c,hit) b = .Chart.get_BarFromPoint(-1,-1) With .Items .set_ItemBar(0,"<*>",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected,False) .set_ItemBar(h,b,exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected,True) End With End With End Sub Dim h With Exg2antt1 .BeginUpdate() .DefaultItemHeight = 32 With .VisualAppearance .Add(1,"gBFLBCJwBAEHhEJAEGg4BNkMQAAYAQGKIYBkAKBQAGaAoDDYNQwQwAAwjIKEEwsACEIrjKCVIgkHYJRjGEZxMAsEwjAoaQChEZRUhEMgxDDIIxAJIcaw0GSEZwgOQZB" & _ "iOEYnDANMgzDLMZR7DajYymSA6LiKNo+QjKFB0NLMVRtEIIIzCSCaNomT4DS4NIi2DYcVhhMqBYbtCZZBo2FpZUxXdL0BJMVxbHKYJikW4pVjoAJ+TxccjVDQNJyLQ6r" & _ "YzuAAKNpuO58RbdGDQHA9KyfLCEcTxYAMbp6X5kaBZVp2VCMRzbTLUIDzPNVCTrNIaJioAaMeiCG5NUzieqRNalLABFjZMIHDbtGynDIJZruW52+CLIZpWbEOiRXr2Tx" & _ "xgGYp5Fie5mAYBgIgSFDrDOIZUmQZYiECXJUjIEQ3lUGgbEIRQcg+Hg8DEFxYFuOR/i+X5znufh/omBgCgCVwjn4BoBmCCAmAqApgkefgMgOYQID4DoELsUgTgUYYIC4" & _ "F4GGGSAaBuBxhhgfgggUYgog4EYJGIaBJn6ChiBiLgsgkIpoj4J4BCMSJWDaDZjgiZgCEAQCAgA==") .Add(2,"CP:1 -2 -2 2 2") End With With .Chart .AllowSelectObjects = exontrol.EXG2ANTTLib.SelectObjectsEnum.exNoSelectObjects .FirstVisibleDate = #1/1/2002# .SelBarColor32 = &H2000000 .set_PaneWidth(False,48) End With .Columns.Add("Task") With .Items h = .AddItem("Task") .AddBar(h,"Task",#1/2/2002#,#1/4/2002#,"A") .AddBar(h,"Task",#1/6/2002#,#1/10/2002#,"B") .AddBar(h,"Task",#1/11/2002#,#1/14/2002#,"C") .set_ItemBar(h,"B",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected,True) End With .EndUpdate() End With |
1844 |
How can I change the bar's color (sample 3, ebn, individual, global)
Dim hSummaryJ,hSummaryK,hTaskJ,hTaskK With Exg2antt1 .BeginUpdate() With .VisualAppearance .RenderType = &Hfffffffeui .Add(1,"gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDAMgBQKAAzQFAYahuGSGAAGMYxQgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQLOEgwH" & _ "IERQjEyUJAGGQIHhyPYbUbGUpQHKkeRtGqgBgoKhKEouNYgAbGYIwTRsdyfDSXBpEWwbDgkNQwWTDNoRDIUQStCysaYjOpnfrUAJ1P7FdQ1NJkXRhGSSK7maapaiCSZ6" & _ "STCMj1FhVKSNJ7DQKhGpgKh/ApgYpQOK4fLNXyRBK4QAyKA6bgPFZOZbFViaXY1V5bNKrcjhHQwAyHJ4XXRdV4YRAkUT4GqiJKGSYcQhuXZWbRqO6ABhef6DRThc6jKp" & _ "FHIE4llEcojHqSZNgoIxnlgd5thsLREleL43gsYZ9BkaAYkMAgAm+CxGDWWAtiKCRfjcdRgHoHYnicUwgAIEIREAaQYkcQZUHIGRUDQJBOEYRAhDYCxGgMZAkCgdYQha" & _ "XQIAYERwQuahXggdgeG6VZ4H4IhdiIGIOB8YIiGiHZZgqYpGF4KYHiKCI+CAU5jCiTQ2g0YhEFyax4gABAEIC") .Add(2,"gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQG" & _ "h+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKf" & _ "aZACj4arKejrRDCMAggI=") End With .Columns.Add("Task") With .Chart .set_PaneWidth(False,128) .FirstVisibleDate = #1/1/2001# With .Bars.Item("Task") .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .Color32 = &H1000000 End With With .Bars.Item("Summary") .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .Color32 = &H2000000 End With End With With .Items hSummaryJ = .AddItem("Summary A") .AddBar(hSummaryJ,"Summary",#1/2/2001#,#1/2/2001#,"J") hTaskJ = .InsertItem(hSummaryJ,Nothing,"Task A.1") .AddBar(hTaskJ,"Task",#1/2/2001#,#1/5/2001#,"J1") hTaskJ = .InsertItem(hSummaryJ,Nothing,"Task A.2") .AddBar(hTaskJ,"Task",#1/4/2001#,#1/8/2001#,"J2") .DefineSummaryBars(hSummaryJ,"J",-1,"<*>") hSummaryK = .AddItem("Summary B") .AddBar(hSummaryK,"Summary",#1/2/2001#,#1/2/2001#,"K") hTaskK = .InsertItem(hSummaryK,Nothing,"Task B.1") .AddBar(hTaskK,"Task",#1/2/2001#,#1/5/2001#,"K1") hTaskK = .InsertItem(hSummaryK,Nothing,"Task B.2") .AddBar(hTaskK,"Task",#1/4/2001#,#1/8/2001#,"K2") .DefineSummaryBars(hSummaryK,"K",-1,"<*>") .set_ItemBar(0,"<K*>",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255) .set_ExpandItem(0,True) End With .EndUpdate() End With |
1843 |
How can I change the bar's color (sample 2, global)
Dim hSummaryJ,hSummaryK,hTaskJ,hTaskK With Exg2antt1 .BeginUpdate() .Columns.Add("Task") With .Chart .set_PaneWidth(False,128) .FirstVisibleDate = #1/1/2001# With .Bars.Item("Task") .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .Color = Color.FromArgb(255,0,0) End With With .Bars.Item("Summary") .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .Color = Color.FromArgb(255,0,0) .StartColor = .Color .EndColor = .Color End With End With With .Items hSummaryJ = .AddItem("Summary A") .AddBar(hSummaryJ,"Summary",#1/2/2001#,#1/2/2001#,"J") hTaskJ = .InsertItem(hSummaryJ,Nothing,"Task A.1") .AddBar(hTaskJ,"Task",#1/2/2001#,#1/5/2001#,"J1") hTaskJ = .InsertItem(hSummaryJ,Nothing,"Task A.2") .AddBar(hTaskJ,"Task",#1/4/2001#,#1/8/2001#,"J2") .DefineSummaryBars(hSummaryJ,"J",-1,"<*>") hSummaryK = .AddItem("Summary B") .AddBar(hSummaryK,"Summary",#1/2/2001#,#1/2/2001#,"K") hTaskK = .InsertItem(hSummaryK,Nothing,"Task B.1") .AddBar(hTaskK,"Task",#1/2/2001#,#1/5/2001#,"K1") hTaskK = .InsertItem(hSummaryK,Nothing,"Task B.2") .AddBar(hTaskK,"Task",#1/4/2001#,#1/8/2001#,"K2") .DefineSummaryBars(hSummaryK,"K",-1,"<*>") .set_ExpandItem(0,True) End With .EndUpdate() End With |
1842 |
How can I change the bar's color (sample 1, individual)
Dim hSummaryJ,hSummaryK,hTaskJ,hTaskK With Exg2antt1 .BeginUpdate() .Columns.Add("Task") With .Chart .set_PaneWidth(False,128) .FirstVisibleDate = #1/1/2001# .Bars.Item("Task").set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .Bars.Item("Summary").set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) End With With .Items hSummaryJ = .AddItem("Summary A") .AddBar(hSummaryJ,"Summary",#1/2/2001#,#1/2/2001#,"J"," (default)") hTaskJ = .InsertItem(hSummaryJ,Nothing,"Task A.1") .AddBar(hTaskJ,"Task",#1/2/2001#,#1/5/2001#,"J1","(default)") hTaskJ = .InsertItem(hSummaryJ,Nothing,"Task A.2") .AddBar(hTaskJ,"Task",#1/4/2001#,#1/8/2001#,"J2","(default)") .DefineSummaryBars(hSummaryJ,"J",-1,"<*>") hSummaryK = .AddItem("Summary B") .AddBar(hSummaryK,"Summary",#1/2/2001#,#1/2/2001#,"K") hTaskK = .InsertItem(hSummaryK,Nothing,"Task B.1") .AddBar(hTaskK,"Task",#1/2/2001#,#1/5/2001#,"K1") hTaskK = .InsertItem(hSummaryK,Nothing,"Task B.2") .AddBar(hTaskK,"Task",#1/4/2001#,#1/8/2001#,"K2") .DefineSummaryBars(hSummaryK,"K",-1,"<*>") .set_ItemBar(hSummaryK,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255) .set_ItemBar(0,"<K*>",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255) .set_ExpandItem(0,True) End With .EndUpdate() End With |
1841 |
How do I make the control read-only (method 2)
' Edit event - Occurs just before editing the focused cell. Private Sub Exg2antt1_EditEvent(ByVal sender As System.Object,ByVal Item As Integer,ByVal ColIndex As Integer,ByRef Cancel As Boolean) Handles Exg2antt1.EditEvent With Exg2antt1 Cancel = True End With End Sub With Exg2antt1 .BeginUpdate() With .Columns.Add("Editor").Editor .EditType = exontrol.EXG2ANTTLib.EditTypeEnum.CheckListType .AddItem(1,"One") .AddItem(2,"Two") End With With .Columns.Add("Check") With .Editor .EditType = exontrol.EXG2ANTTLib.EditTypeEnum.CheckValueType .set_Option(exontrol.EXG2ANTTLib.EditorOptionEnum.exCheckValue1,2) End With End With With .Items .set_CellValue(.AddItem(1),1,0) .set_CellValue(.AddItem(2),1,1) End With .EndUpdate() End With |
1840 |
How do I make the control read-only (method 1)
With Exg2antt1 .BeginUpdate() .ReadOnly = exontrol.EXG2ANTTLib.ReadOnlyEnum.exReadOnly With .Columns.Add("Editor").Editor .EditType = exontrol.EXG2ANTTLib.EditTypeEnum.CheckListType .AddItem(1,"One") .AddItem(2,"Two") End With With .Columns.Add("Check") With .Editor .EditType = exontrol.EXG2ANTTLib.EditTypeEnum.CheckValueType .set_Option(exontrol.EXG2ANTTLib.EditorOptionEnum.exCheckValue1,2) End With End With With .Items .set_CellValue(.AddItem(1),1,0) .set_CellValue(.AddItem(2),1,1) End With .EndUpdate() End With |
1839 |
The ReadOnly property does not prevent changing the column's check-box (sample 2)
With Exg2antt1 .BeginUpdate() .ShowFocusRect = False With .Columns.Add("C1") .AllowSizing = False .Width = 18 .Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.CheckValueType End With .Columns.Add("C2") With .Items .set_CellValue(.AddItem(0),1,"Item 1") .set_CellValue(.AddItem(-1),1,"Item 2") .set_CellValue(.AddItem(0),1,"Item 3") End With .ReadOnly = exontrol.EXG2ANTTLib.ReadOnlyEnum.exReadOnly .Columns.Item(0).Editor.set_Option(exontrol.EXG2ANTTLib.EditorOptionEnum.exCheckValue2,2) .EndUpdate() End With |
1838 |
The ReadOnly property does not prevent changing the column's check-box (sample 1)
With Exg2antt1 .BeginUpdate() .ShowFocusRect = False With .Columns.Add("C1") .AllowSizing = False .Width = 18 With .Editor .EditType = exontrol.EXG2ANTTLib.EditTypeEnum.CheckValueType .set_Option(exontrol.EXG2ANTTLib.EditorOptionEnum.exCheckValue2,1) End With End With .Columns.Add("C2") With .Items .set_CellValue(.AddItem(0),1,"Item 1") .set_CellValue(.AddItem(-1),1,"Item 2") .set_CellValue(.AddItem(0),1,"Item 3") End With .ReadOnly = exontrol.EXG2ANTTLib.ReadOnlyEnum.exReadOnly .EndUpdate() End With |
1837 |
How can I change the visual appearance of the control's split bar (sample 3)
With Exg2antt1 .BeginUpdate() .Columns.Add("Default") With .VisualAppearance .Add(1,"gBFLBCJwBAEHhEJAAEhABPsIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRrGUQxCKIZhzEgYRokAYYRDIMg5SBIETzFIMCQ9AaaJpieRJG" & _ "iiKoJSxHErgFD8QxzEKOZqnCapViAMpOAZQAwDAIoWhpKKBRhqOpRUhaID/WAAFCUZK4ASTDCyLRgNy4lACgI") .Add(2,"gBFLBCJwBAEHhEJAAEhABPkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRrGUQxCKIZhzEgYRoiEYhXDiIAxARHcgyBIMPQJGSaZpkSRpI" & _ "iqHItS6BM4RVKkcw7G6BaJnGJpADKTQGQiMIwDAIoWhpKCBaiqSpqMglf5fg6pOJqHACZZKWLNLpxDBMAkBA=") .Add(3,"gBFLBCJwBAEHhEJAAEhABUUIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRrGQCwTCIYhmHKSRhGSIRSDcOIgDCBEbyDIEQw9AiZZqmaRZH" & _ "imK4cS5MEhwHKsLSLGyOZwoSapbgmJooU5KUwSYKQcxBI6laYpIAKJhiWobTxUEBwMKlJw5KoBJxjKqIbp2XZsUxIAxXEA1HBgGASRZGS5bDreeQ0UZCL74GAFUy/Lib" & _ "a6weqnLhGCYBgIA==") End With .set_Background32(exontrol.EXG2ANTTLib.BackgroundPartEnum.exSplitBar,&H1808080) .set_Background32(exontrol.EXG2ANTTLib.BackgroundPartEnum.exHSplitBar,&H2808080) .set_Background32(exontrol.EXG2ANTTLib.BackgroundPartEnum.exCSplitBar,&H3010101) .BackColorLevelHeader = .BackColor With .Chart .LevelCount = 2 .set_PaneWidth(False,64) .HistogramVisible = True .HistogramHeight = 64 .OverviewHeight = 48 .OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAll End With .EndUpdate() End With |
1836 |
How can I change the color for the control's split bar (sample 2)
With Exg2antt1 .BeginUpdate() .Columns.Add("Default") .set_Background(exontrol.EXG2ANTTLib.BackgroundPartEnum.exSplitBar,Color.FromArgb(190,190,190)) .set_Background(exontrol.EXG2ANTTLib.BackgroundPartEnum.exHSplitBar,Color.FromArgb(128,128,128)) .set_Background(exontrol.EXG2ANTTLib.BackgroundPartEnum.exCSplitBar,Color.FromArgb(0,0,1)) .BackColorLevelHeader = .BackColor With .Chart .LevelCount = 2 .set_PaneWidth(False,64) .HistogramVisible = True .HistogramHeight = 64 .OverviewHeight = 48 .OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAll End With .EndUpdate() End With |
1835 |
How do I highlight a bar with an icon, exclamation mark or some warning sign, without using exBarCaption, exBarExtraCaption which I've already use for something else ( sample 2 )
Dim h With Exg2antt1 .BeginUpdate() With .Chart .FirstVisibleDate = #12/26/2000# .set_PaneWidth(False,128) End With .Columns.Add("Column") With .Items .AddItem("") h = .AddItem("Item") .AddItem("") .AddBar(h,"Task",#1/1/2001#,#1/13/2001#,"A") End With With .Chart.Notes With .Add("Attention",Exg2antt1.Items.get_ItemByIndex(1),"A"," <font ;11>! ") .RelativePosition = 0.5 .ShowLink = exontrol.EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden .set_PartVOffset(exontrol.EXG2ANTTLib.NotePartEnum.exNoteEnd,0) .set_PartShadow(exontrol.EXG2ANTTLib.NotePartEnum.exNoteEnd,False) .set_PartBackColor(exontrol.EXG2ANTTLib.NotePartEnum.exNoteEnd,Color.FromArgb(255,255,0)) End With End With .EndUpdate() End With |
1834 |
How do I highlight a bar with an icon, exclamation mark or some warning sign, without using exBarCaption, exBarExtraCaption which I've already use for something else ( sample 1 )
Dim h With Exg2antt1 .BeginUpdate() With .Chart .FirstVisibleDate = #12/26/2000# .set_PaneWidth(False,128) End With .Columns.Add("Column") With .Items .AddItem("") h = .AddItem("Item") .AddItem("") .AddBar(h,"Task",#1/1/2001#,#1/13/2001#,"A") .set_ItemBar(h,"A",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt,"[text=`<bgcolor=FFFF00><font ;11> ! `,align=0x11]") .set_ItemBar(h,"A",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate,8) End With .EndUpdate() End With |
1833 |
How do I get the "Summary" bar being shown in the control's histogram (sample 2)
Dim hSummary,hTask With Exg2antt1 .BeginUpdate() .Columns.Add("Task") .VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQG" & _ "h+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKf" & _ "aZACj4arKejrRDCMAggI=") With .Chart .set_PaneWidth(False,128) .FirstVisibleDate = #1/1/2001# .HistogramVisible = True .HistogramHeight = 64 .HistogramView = exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems With .Bars.Item("Task") .HistogramPattern = .Pattern .HistogramType = exontrol.EXG2ANTTLib.HistogramTypeEnum.exHistCumulative .HistogramCumulativeOriginalColorBars = exontrol.EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exKeepOriginalColor End With End With With .Items hSummary = .AddItem("Summary") .AddBar(hSummary,"Task",#1/2/2001#,#1/2/2001#,"") .set_ItemBar(hSummary,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,16777216) hTask = .InsertItem(hSummary,Nothing,"Task A") .AddBar(hTask,"Task",#1/2/2001#,#1/5/2001#,"K1") hTask = .InsertItem(hSummary,Nothing,"Task B") .AddBar(hTask,"Task",#1/4/2001#,#1/8/2001#,"K2") hTask = .InsertItem(hSummary,Nothing,"Task C") .AddBar(hTask,"Task",#1/12/2001#,#1/17/2001#,"K3") .set_ExpandItem(hSummary,True) .DefineSummaryBars(hSummary,"",-1,"<*>") End With .EndUpdate() End With |
1832 |
How do I get the "Summary" bar being shown in the control's histogram (sample 1)
Dim hSummary,hTask With Exg2antt1 .BeginUpdate() .VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQG" & _ "h+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKf" & _ "aZACj4arKejrRDCMAggI=") .Columns.Add("Task") With .Chart .set_PaneWidth(False,128) .FirstVisibleDate = #1/1/2001# .HistogramVisible = True .HistogramHeight = 64 .HistogramView = exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems With .Bars.Item("Task") .HistogramPattern = .Pattern End With With .Bars.Item("Summary") .Color32 = &H1000000 .HistogramColor = Color.FromArgb(0,0,1) .HistogramPattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternBDiagonal End With End With With .Items hSummary = .AddItem("Summary") .AddBar(hSummary,"Summary",#1/2/2001#,#1/2/2001#,"") hTask = .InsertItem(hSummary,Nothing,"Task A") .AddBar(hTask,"Task",#1/2/2001#,#1/5/2001#,"K1") hTask = .InsertItem(hSummary,Nothing,"Task B") .AddBar(hTask,"Task",#1/4/2001#,#1/8/2001#,"K2") hTask = .InsertItem(hSummary,Nothing,"Task C") .AddBar(hTask,"Task",#1/12/2001#,#1/17/2001#,"K3") .set_ExpandItem(hSummary,True) .DefineSummaryBars(hSummary,"",-1,"<*>") End With .EndUpdate() End With |
1831 |
How can I temporarily/programmatically hide the control's tooltip
' RClick event - Fired when right mouse button is clicked Private Sub Exg2antt1_RClick(ByVal sender As System.Object) Handles Exg2antt1.RClick Dim nToolTipDelay With Exg2antt1 nToolTipDelay = .ToolTipDelay .ToolTipDelay = 0 .ToolTipDelay = nToolTipDelay End With End Sub With Exg2antt1 .BeginUpdate() .Columns.Add("Column w/h tooltip...").ToolTip = "This is a bit of text that's shown when the cursor hovers the column.<br><br><sha ;;0><c>Right-Click to hide it</sha>" With .Chart .FirstWeekDay = .LocFirstWeekDay .MonthNames = .LocMonthNames .WeekDays = .LocWeekDays .AMPM = .LocAMPM .LevelCount = 2 .set_PaneWidth(False,128) .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay End With .HeaderAppearance = exontrol.EXG2ANTTLib.AppearanceEnum.Flat .BackColorLevelHeader = .BackColor .EndUpdate() End With |
1830 |
Is it possible to find out the handle of the item, giving the key of the bar only
With Exg2antt1 .BeginUpdate() .Debug = True .DefaultItemHeight = 32 .Columns.Add("Task") With .Chart .set_PaneWidth(False,64) .Bars.Item("Task").Height = 16 .FirstVisibleDate = #1/1/2001# .ShowLinks = exontrol.EXG2ANTTLib.ShowExtendedLinksEnum.exShowExtendedLinks End With With .Items .AddBar(.AddItem("Task 1"),"Task",#1/2/2001#,#1/4/2001#,"K1") .AddBar(.AddItem("Task 2"),"Task",#1/5/2001#,#1/7/2001#,"K2") .set_ItemBold(.get_ItemBar(0,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarParent),True) End With .EndUpdate() End With |
1829 |
How can I programmatically add a link between two bars, knowing the keys of these bars only
Dim h1,h2,h3 With Exg2antt1 .BeginUpdate() .Debug = True .DefaultItemHeight = 32 .Columns.Add("Task") With .Chart .set_PaneWidth(False,64) .Bars.Item("Task").Height = 16 .FirstVisibleDate = #1/1/2001# .ShowLinks = exontrol.EXG2ANTTLib.ShowExtendedLinksEnum.exShowExtendedLinks End With With .Items h1 = .AddItem("Task 1") .AddBar(h1,"Task",#1/2/2001#,#1/4/2001#,"K1") h2 = .AddItem("Task 2") .AddBar(h2,"Task",#1/5/2001#,#1/7/2001#,"AK2") h3 = .AddItem("Task 3") .AddBar(h3,"Task",#1/5/2001#,#1/7/2001#,"AK3") .AddLink("Link1",0,"K1",0,"AK2") .AddLink("Link2",0,"K1",0,"<A?3>") .AddLink("Link3",0,"<*2>",0,"AK3") End With .EndUpdate() End With |
1828 |
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 3)
Dim h,hChild With Exg2antt1 .BeginUpdate() .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exRowLines .AutoDrag = exontrol.EXG2ANTTLib.AutoDragEnum.exAutoDragPositionAny .HasLines = exontrol.EXG2ANTTLib.HierarchyLineEnum.exSolidLine .Indent = 16 .MarkSearchColumn = False With .Columns With .Add("") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) .FormatColumn = "((1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 + `` : (=:0 mid (1 + 1 + =:1) ) + `)` ) + ` ` + value" End With End With With .Items h = .AddItem("Root") .InsertItem(h,Nothing,"Child") hChild = .InsertItem(h,Nothing,"Child") .InsertItem(hChild,Nothing,"Child") .InsertItem(hChild,Nothing,"Child") .InsertItem(hChild,Nothing,"Child") .InsertItem(h,Nothing,"Child") .set_ExpandItem(0,True) h = .AddItem("Root") .InsertItem(h,Nothing,"Child") hChild = .InsertItem(h,Nothing,"Child") .set_CellState(hChild,0,1) .InsertItem(hChild,Nothing,"Child") .InsertItem(hChild,Nothing,"Child") .InsertItem(hChild,Nothing,"Child") .InsertItem(h,Nothing,"Child") End With .EndUpdate() End With |
1827 |
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 2)
Dim h,hChild With Exg2antt1 .BeginUpdate() .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot .GridLineColor = Color.FromArgb(190,190,190) .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exRowLines .AutoDrag = exontrol.EXG2ANTTLib.AutoDragEnum.exAutoDragPositionAny .HasLines = exontrol.EXG2ANTTLib.HierarchyLineEnum.exSolidLine .Indent = 16 With .Columns .Add("Default") With .Add("") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellPaddingRight,4) .AllowSizing = False .Width = 36 .Position = 0 .FormatColumn = "(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : (`............` left 2 * (=:0 count `.`)) + (=:0 mid (1 + 1 + =" & _ ":1) ) " End With End With With .Items h = .AddItem("Root") .InsertItem(h,Nothing,"Child") hChild = .InsertItem(h,Nothing,"Child") .InsertItem(hChild,Nothing,"Child") .InsertItem(hChild,Nothing,"Child") .InsertItem(hChild,Nothing,"Child") .InsertItem(h,Nothing,"Child") .set_ExpandItem(0,True) h = .AddItem("Root") .InsertItem(h,Nothing,"Child") hChild = .InsertItem(h,Nothing,"Child") .set_CellState(hChild,0,1) .InsertItem(hChild,Nothing,"Child") .InsertItem(hChild,Nothing,"Child") .InsertItem(hChild,Nothing,"Child") .InsertItem(h,Nothing,"Child") End With .EndUpdate() End With |
1826 |
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 1)
Dim h,hChild With Exg2antt1 .BeginUpdate() .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exRowLines .AutoDrag = exontrol.EXG2ANTTLib.AutoDragEnum.exAutoDragPositionAny .HasLines = exontrol.EXG2ANTTLib.HierarchyLineEnum.exSolidLine .Indent = 16 With .Columns .Add("Default") With .Add("") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellPaddingRight,4) .Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.RightAlignment .AllowSizing = False .Width = 24 .Position = 0 .FormatColumn = "(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : `<i>` + (=:0 mid (1 + 1 + =:1) ) " End With End With With .Items h = .AddItem("Root") .InsertItem(h,Nothing,"Child") hChild = .InsertItem(h,Nothing,"Child") .InsertItem(hChild,Nothing,"Child") .InsertItem(hChild,Nothing,"Child") .InsertItem(hChild,Nothing,"Child") .InsertItem(h,Nothing,"Child") .set_ExpandItem(0,True) h = .AddItem("Root") .InsertItem(h,Nothing,"Child") hChild = .InsertItem(h,Nothing,"Child") .set_CellState(hChild,0,1) .InsertItem(hChild,Nothing,"Child") .InsertItem(hChild,Nothing,"Child") .InsertItem(hChild,Nothing,"Child") .InsertItem(h,Nothing,"Child") End With .EndUpdate() End With |
1825 |
How can I programmatically group by columns, without having the control's sort bar visible
Dim rs With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) .ColumnAutoResize = False rs = New ADODB.Recordset() With rs .Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) End With .DataSource = rs .SortBarHeight = 0 .SortBarVisible = True .SortBarCaption = "Drag a <b>column</b> header here to group by that column." .AllowGroupBy = True .Layout = "multiplesort=""C1:2""" .EndUpdate() End With |
1824 |
How do I perform my own sort
' Sort event - Fired when the control sorts a column. Private Sub Exg2antt1_Sort(ByVal sender As System.Object) Handles Exg2antt1.Sort With Exg2antt1 Debug.Print( "Sort" ) With .Items .set_ItemPosition(.get_ItemByIndex(1),0) .set_ItemPosition(.get_ItemByIndex(0),1) End With End With End Sub Dim h With Exg2antt1 .BeginUpdate() .SingleSort = False .SortOnClick = exontrol.EXG2ANTTLib.SortOnClickEnum.exUserSort With .Columns .Add("Index").FormatColumn = "0 index ``" .Add("Data 1") .Add("Data 2") End With With .Items h = .AddItem(0) .set_CellValue(h,1,2) .set_CellValue(h,2,3) h = .AddItem(4) .set_CellValue(h,1,5) .set_CellValue(h,2,6) h = .AddItem(7) .set_CellValue(h,1,8) .set_CellValue(h,2,9) End With .Layout = "multiplesort=""C1:1 C2:2""" .EndUpdate() End With |
1823 |
Is it possible to have a different alignment for parts of the cell's caption
Dim h With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,True) .TreeColumnIndex = -1 .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exRowLines With .Columns.Add("Default") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) End With With .Items .set_CellHAlignment(.AddItem("all-left"),0,exontrol.EXG2ANTTLib.AlignmentEnum.LeftAlignment) .set_CellHAlignment(.AddItem("all-center"),0,exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment) .set_CellHAlignment(.AddItem("all-right"),0,exontrol.EXG2ANTTLib.AlignmentEnum.RightAlignment) h = .AddItem("left<c>center<r>right") .set_CellValueFormat(h,0,exontrol.EXG2ANTTLib.ValueFormatEnum.exHTML) End With .EndUpdate() End With |
1822 |
I have a column with Def(exCellSingleLine) property on False, word-wrapping, and I am wondering if possible to update the column's content while user is resizing it
With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) With .Columns With .Add("MultipleLine") .Width = 32 .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellSingleLine,False) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exColumnResizeContiguously,True) End With With .Add("SingleLine") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellSingleLine,False) End With End With With .Items .set_CellValue(.AddItem("This is a bit of long text that should break the line"),1,"This is a bit of long text that should break the line") End With .EndUpdate() End With |
1821 |
Is there an other way to detect if a bar is overlapping any other bar
' BarResizing event - Occurs when a bar is moving or resizing. Private Sub Exg2antt1_BarResizing(ByVal sender As System.Object,ByVal Item As Integer,ByVal Key As Object) Handles Exg2antt1.BarResizing With Exg2antt1 .Refresh() End With End Sub Dim h With Exg2antt1 .BeginUpdate() .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exVLines .HeaderAppearance = exontrol.EXG2ANTTLib.AppearanceEnum.Etched .BackColorLevelHeader = .BackColor .DefaultItemHeight = 22 .Columns.Add("Task") With .Columns.Add("Intersect / Count") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"A") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,521) .LevelKey = 1 End With With .Columns.Add(" / With") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"A") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,520) .LevelKey = 1 End With .Items.AllowCellValueToItemBar = True With .Chart .LevelCount = 2 .set_PaneWidth(False,148) .FirstVisibleDate = #1/1/2001# With .Bars.Item("Task") .OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsOffset .OverlaidGroup = "TaskB" .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,16) End With With .Bars.Add("TaskB") .Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternBDiagonal .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) End With End With With .Items h = .AddItem("A") .AddBar(h,"Task",#1/2/2001#,#1/4/2001#,"A","A") .AddBar(h,"TaskB",#1/3/2001#,#1/5/2001#,"B","B") h = .AddItem("A") .AddBar(h,"Task",#1/6/2001#,#1/9/2001#,"A","A") .AddBar(h,"TaskB",#1/10/2001#,#1/13/2001#,"B","B") h = .AddItem("A") .AddBar(h,"TaskB",#1/6/2001#,#1/9/2001#,"B1","B1") .AddBar(h,"Task",#1/10/2001#,#1/13/2001#,"A","A") .AddBar(h,"TaskB",#1/10/2001#,#1/13/2001#,"B2","B2") h = .AddItem("A") .AddBar(h,"Task",#1/8/2001#,#1/11/2001#,"B1","B1") .AddBar(h,"Task",#1/10/2001#,#1/13/2001#,"A","A") .AddBar(h,"Task",#1/12/2001#,#1/15/2001#,"B2","B2") End With .EndUpdate() End With |
1820 |
How can I get the absolute position of an item
' AddItem event - Occurs after a new Item has been inserted to Items collection. Private Sub Exg2antt1_AddItem(ByVal sender As System.Object,ByVal Item As Integer) Handles Exg2antt1.AddItem With Exg2antt1 With .Items .AddBar(Item,"Task",#1/2/2017#,#1/5/2017#) End With End With End Sub ' MouseMove event - Occurs when the user moves the mouse. Private Sub Exg2antt1_MouseMoveEvent(ByVal sender As System.Object,ByVal Button As Short,ByVal Shift As Short,ByVal X As Integer,ByVal Y As Integer) Handles Exg2antt1.MouseMoveEvent Dim c,hit With Exg2antt1 With .Items Debug.Print( .get_CellCaption(Exg2antt1.get_ItemFromPoint(-1,-1,c,hit),"Position") ) End With End With End Sub Dim h With Exg2antt1 .BeginUpdate() With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2017# End With .BackColorLevelHeader = .BackColor .BackColorAlternate = Color.FromArgb(240,240,240) .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot .Columns.Add("Def").DisplayFilterButton = True With .Items h = .AddItem("Root") .InsertItem(.InsertItem(h,Nothing,"Child 1"),Nothing,"Sub-Child 1") .InsertItem(.InsertItem(h,Nothing,"Child 2"),Nothing,"Sub-Child 2") End With .PutItems(.GetItems(-1)) .PutItems(.GetItems(-1)) .PutItems(.GetItems(-1)) With .Columns.Add("Position") .FormatColumn = "1 apos ``" .Visible = False End With .EndUpdate() End With |
1819 |
How do I sort the index column as numeric (Method 2)
' AddItem event - Occurs after a new Item has been inserted to Items collection. Private Sub Exg2antt1_AddItem(ByVal sender As System.Object,ByVal Item As Integer) Handles Exg2antt1.AddItem With Exg2antt1 With .Items .set_CellData(Item,1,.get_CellCaption(Item,1)) End With End With End Sub With Exg2antt1 .BeginUpdate() .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines .ColumnAutoResize = True .ShowFocusRect = False With .Columns.Add("Next") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft,4) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exHeaderPaddingLeft,4) End With With .Columns.Add("Index") .AllowSizing = False .Width = 48 .FormatColumn = "(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)" .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) .SortType = exontrol.EXG2ANTTLib.SortTypeEnum.SortUserData .Position = 0 End With With .Items .AddItem("Item 1") .AddItem("Item 2") .AddItem("Item 3") .AddItem("Item 4") .AddItem("Item 5") .AddItem("Item 6") .AddItem("Item 7") .AddItem("Item 8") .AddItem("Item 9") .AddItem("Item 10") End With .EndUpdate() End With |
1818 |
How do I sort the index column as numeric (Method 1)
With Exg2antt1 .BeginUpdate() With .Columns.Add("Sort Index As String (Default)") .FormatColumn = "1 index ``" End With With .Columns.Add("Sort Index As Numeric") .ComputedField = "%C0" .SortType = exontrol.EXG2ANTTLib.SortTypeEnum.SortNumeric End With With .Items .AddItem("") .AddItem("") .AddItem("") .AddItem("") .AddItem("") .AddItem("") .AddItem("") .AddItem("") .AddItem("") .AddItem("") End With .EndUpdate() End With |
1817 |
How can I put icons/images into buttons
With Exg2antt1 .BeginUpdate() .ColumnAutoResize = True .Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _ "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _ "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _ "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") With .Columns.Add("C+B") .AllowSizing = False .Width = 48 .FormatColumn = "` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `" .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasButton,True) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellButtonAutoWidth,True) End With .Columns.Add("") .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exVLines .DefaultItemHeight = 20 With .Items .AddItem("") .AddItem("") .AddItem("") .AddItem("") .AddItem("") .AddItem("") .AddItem("") .AddItem("") End With .EndUpdate() End With |
1816 |
Is it possible to have a CheckBox and Button TOGETHER on all cells in a column
' ButtonClick event - Occurs when user clicks on the cell's button. Private Sub Exg2antt1_ButtonClick(ByVal sender As System.Object,ByVal Item As Integer,ByVal ColIndex As Integer,ByVal Key As Object) Handles Exg2antt1.ButtonClick With Exg2antt1 Debug.Print( "ButtonClick" ) Debug.Print( Item ) Debug.Print( Key ) End With End Sub ' CellStateChanged event - Fired after cell's state has been changed. Private Sub Exg2antt1_CellStateChanged(ByVal sender As System.Object,ByVal Item As Integer,ByVal ColIndex As Integer) Handles Exg2antt1.CellStateChanged With Exg2antt1 Debug.Print( "CellStateChanged" ) Debug.Print( Item ) End With End Sub With Exg2antt1 .BeginUpdate() .ColumnAutoResize = True With .Columns.Add("") .AllowSizing = False .Width = 32 .FormatColumn = "1 index ``" End With With .Columns.Add("Def") .AllowSizing = False .Width = 48 .FormatColumn = "` `" .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasButton,True) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellButtonAutoWidth,True) End With .Columns.Add("") With .Items .AddItem("") .AddItem("") .AddItem("") .AddItem("") .AddItem("") .AddItem("") .AddItem("") .AddItem("") End With .EndUpdate() End With |
1815 |
Does filtering work with umlauts / accents characters
With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) With .Columns.Add("Names") .DisplayFilterButton = True .FilterType = exontrol.EXG2ANTTLib.FilterTypeEnum.exPattern End With With .Items .AddItem("Mantel") .AddItem("Mechanik") .AddItem("Motor") .AddItem("Murks") .AddItem("Märchen") .AddItem("Möhren") .AddItem("Mühle") .AddItem("Sérigraphie") End With .Columns.Item(0).Filter = "*ä*" .ApplyFilter() .EndUpdate() End With |
1814 |
How can I temporarily disable resizing the overview part of the control
With Exg2antt1 .BeginUpdate() .BackColorLevelHeader = .BackColor .OnResizeControl = exontrol.EXG2ANTTLib.OnResizeControlEnum.exDisableOverview With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,48) .OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewSplitter Or exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScale Or exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewAllowVerticalScroll Or exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible .OverviewHeight = 32 End With .Columns.Add("Column") With .Items .AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/11/2001#) .AddBar(.AddItem("Item 2"),"Task",#2/2/2001#,#2/11/2001#) .AddBar(.AddItem("Item 3"),"Task",#3/2/2001#,#3/11/2001#) End With .EndUpdate() End With |
1813 |
Is it possible to resize the overview part of the control at runtime
With Exg2antt1 .BeginUpdate() .VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABVADg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSBcEgTDaMYzgMBYJhEMQyDSAUIjPEyMg0DjIIwgJIUaw0GSXIRkGQZC" & _ "hGJooTJQMrTZIEbQxHSkIyRVTmZACS5NRZPYy0FAkQhlFSbJBCOKwVomR5KUxTVg1DJwahLCKULLhGI7KgObIRSJOcZ1XAdCQ0cB0XpAC6LaqSA4nSjKcqwJKEZRJIyj" & _ "JwgSrrWhePoJYBVAAQPQdDYaCivK5uWK6PqKUIlZBQGQVNS1MRrLSEcwgPKgAyzDadZzfQAWTZFTQjN61RgtXR6eyoAJ0aziFDVFo0WRlEwacorGhcbgPPrCRrxGBVNw" & _ "gGOJo4kIeASB0Zw/iGDoym6dobh2XpiDWJo5HMd56h6dxjlICIEhQDQmDOIZUmQZZlAADpYHIEQ3nUGgNhCEIhAkawamAAAYEWRAGB2bA2EqYg2AyA4glgPgSgQYRIEI" & _ "FoEmEeBWBiBphFAAgPDwDgDEycQ4A0Q5IwkDwjgyWA8k4SIsmUNoPEOFJbD0DhjHINA3E8Q4eDiDojhiYJmg+Ixokic4LmKQxiCkNk2CCX4DmGaA0nAN4NBiDJSDwTgT" & _ "Eycg4E0WIYlcPJiiiMJZhCTYpgCcw5g2OYOGWGQmCkEJkheYopGoVw1GSGQuA2ExIlOQJcDOZJzEDSJNBiAgiU4Q5GCeChNHkHJygsaBzGaCYimiCY0mMNZoCMWhUDUJ" & _ "5pkYTIDk6YxwkwO5NlMOoch6JQJm4U4JCIMxWFSKbCBoKIgmJDAuDgKhohKIoTk0GhaHOJgNiMKJuDaaYzHCTYnAyaZmjSKIiDiCghjEYg6AaR4yk0OpOiFSQLAKNgjG" & _ "cQ40lkMhOmqZo7DKTpzG6Pw3CmYx2HiNAsCqBh8h6Z5bh6T4oC0G4Im+OAtlMNpTjUTYDCKVo2C3QBLi6a5bH6YY4EyehzAGO4wEwDoejwK5rnK95vDgPJsDWTBjjSWA" & _ "xnEK5aleNhriuawKi8Lp7H8HpHHGXBskyQpxguXwNgMTpDFiRZDnEExfBSPRvHuXwYkycYslae5NjMQwrDGNZxFyHINDsDRTBMKZKnKLIwm2S4xF0Jw8lKTIcm9eA0hy" & _ "QwuksM5jiyVQwnQDQIlaVo0EyLwQlGcRNCME5EjKfYXGSWEhDMQ5QnOahHG6KwoFOCoFiOaBNlcdIjiQag7HOL0dwuxKC1aeNQI4BQihNDoEwXowxmh8CIL8Yg8ROBfA" & _ "SMcaIOR6CHBkMgLgrwUjLHkHMG4NQaBzE4MQaIyw5gxEsH0Dw9FBBNA6PUDoLwpjTHqF0N4WQShSHgGwcY2RkhdFCL8bYdwOivDqNse4fRnh5G+PYEgaR1B0E4B4D4ix" & _ "xB4G8E8SI5R8D+DeJUc4eRPB/EaJ8DwpwojDHUPofwtxYjtH2F4d4sx3j7E+AcXo8B9geFCNYOIHhfg/GmPQPoXw3jZHuPoX4hxuj1H8J8T43RPhDEgM8eo/B/iQGuPw" & _ "fxEh1guAIAwQAgCAg") .BackColorLevelHeader = .BackColor With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,48) .OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewSplitter Or exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScale Or exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewAllowVerticalScroll Or exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible .OverviewHeight = 32 .OverviewSelBackColor32 = &H1000000 .OverviewBackColor = Color.FromArgb(250,250,250) End With .Columns.Add("Column") With .Items .AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/11/2001#) .AddBar(.AddItem("Item 2"),"Task",#2/2/2001#,#2/11/2001#) .AddBar(.AddItem("Item 3"),"Task",#3/2/2001#,#3/11/2001#) End With .EndUpdate() End With |
1812 |
You've provided examples of how to create bars for each record of a MS Access table, however I would like to create a database connected Gantt that has multiple bars per item/resource. Could you please advise
' AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. Private Sub Exg2antt1_AddGroupItem(ByVal sender As System.Object,ByVal Item As Integer) Handles Exg2antt1.AddGroupItem With Exg2antt1 With .Items .AddBar(Item,"Summary",.get_CellValue(Item,2),.get_CellValue(Item,4),"0") .DefineSummaryBars(Item,"0",-3,"0") .AddBar(Item,"SummaryB",.get_CellValue(Item,2),.get_CellValue(Item,4),"1") .DefineSummaryBars(Item,"1",-3,"1") .set_ItemBackColor(Item,Color.FromArgb(240,240,240)) End With .Chart.set_ItemBackColor(Item,Color.FromArgb(240,240,240)) End With End Sub ' AddItem event - Occurs after a new Item has been inserted to Items collection. Private Sub Exg2antt1_AddItem(ByVal sender As System.Object,ByVal Item As Integer) Handles Exg2antt1.AddItem With Exg2antt1 With .Items .AddBar(Item,"Task",.get_CellValue(Item,2),.get_CellValue(Item,4),.get_ItemBar(Item,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount)) .AddBar(Item,"TaskB",.get_CellValue(Item,3),.get_CellValue(Item,4),.get_ItemBar(Item,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount)) End With End With End Sub ' MouseDown event - Occurs when the user presses a mouse button. Private Sub Exg2antt1_MouseDownEvent(ByVal sender As System.Object,ByVal Button As Short,ByVal Shift As Short,ByVal X As Integer,ByVal Y As Integer) Handles Exg2antt1.MouseDownEvent Dim c,hit,i With Exg2antt1 i = .get_ItemFromPoint(-1,-1,c,hit) .FullRowSelect = .Columns.Item(c).Data End With End Sub Dim rs With Exg2antt1 .BeginUpdate() .ScrollBySingleLine = True .HeaderHeight = 22 .HeaderAppearance = exontrol.EXG2ANTTLib.AppearanceEnum.Flat .BackColorLock = Color.FromArgb(240,240,240) .BackColorHeader = .BackColorLock .HasLines = exontrol.EXG2ANTTLib.HierarchyLineEnum.exNoLine .ColumnAutoResize = False .SortBarVisible = False .AllowGroupBy = True .ReadOnly = exontrol.EXG2ANTTLib.ReadOnlyEnum.exReadOnly .ShowFocusRect = False .CountLockedColumns = 1 .AutoDrag = exontrol.EXG2ANTTLib.AutoDragEnum.exAutoDragScroll .SingleSort = False .ColumnsAllowSizing = True .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines .GridLineStyle = exontrol.EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid .GridLineColor = Color.FromArgb(220,220,220) With .Chart .FirstVisibleDate = #9/1/1994# .LevelCount = 2 .set_PaneWidth(False,256) With .Bars.Item("Task") .Height = 15 .Color = Color.FromArgb(128,128,128) .StartColor = Color.FromArgb(204,204,0) .EndColor = .StartColor .OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidGroup = "Task,TaskB" .Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternGradientVBox Or exontrol.EXG2ANTTLib.PatternEnum.exPatternBox End With With .Bars.Copy("Task","TaskB") .Color = Color.FromArgb(128,128,128) .StartColor = Color.FromArgb(153,153,0) .EndColor = .StartColor End With With .Bars.Item("Summary") .OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidGroup = "Summary,SummaryB" .Color = Color.FromArgb(204,204,0) .StartColor = .Color .EndColor = .Color End With With .Bars.Copy("Summary","SummaryB") .Color = Color.FromArgb(153,153,0) .StartColor = .Color .EndColor = .Color End With End With .BackColorSortBar = .BackColor .ColumnAutoResize = False rs = New ADODB.Recordset() With rs .Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) End With .DataSource = rs .Debug = True .Columns.Item(0).Data = -1 .Layout = "singlesort=""C5:1"";multiplesort="" C1:2""" .EndUpdate() End With |
1811 |
How can I filter for multiple captions on a single column, using OR clause
Dim h0 With Exg2antt1 .BeginUpdate() .ColumnAutoResize = True .ContinueColumnScroll = False .MarkSearchColumn = True .SearchColumnIndex = 1 .FilterBarPromptVisible = True With .Columns .Add("Name").Width = 96 With .Add("Title") .Width = 96 End With .Add("City") End With With .Items h0 = .AddItem("Nancy Davolio") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"Seattle") h0 = .AddItem("Andrew Fuller") .set_CellValue(h0,1,"Vice President, Sales") .set_CellValue(h0,2,"Tacoma") .set_SelectItem(h0,True) h0 = .AddItem("Janet Leverling") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"Kirkland") h0 = .AddItem("Margaret Peacock") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"Redmond") h0 = .AddItem("Steven Buchanan") .set_CellValue(h0,1,"Sales Manager") .set_CellValue(h0,2,"London") h0 = .AddItem("Michael Suyama") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"London") h0 = .AddItem("Robert King") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"London") h0 = .AddItem("Laura Callahan") .set_CellValue(h0,1,"Inside Sales Coordinator") .set_CellValue(h0,2,"Seattle") h0 = .AddItem("Anne Dodsworth") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"London") End With .FilterBarPromptColumns = "1" .FilterBarPromptPattern = "Vice Inside" .FilterBarPromptType = exontrol.EXG2ANTTLib.FilterPromptEnum.exFilterPromptContainsAny .EndUpdate() End With |
1810 |
How can I filter for multiple captions on a single column, using AND clause
Dim h0 With Exg2antt1 .BeginUpdate() .ColumnAutoResize = True .ContinueColumnScroll = False .MarkSearchColumn = True .SearchColumnIndex = 1 .FilterBarPromptVisible = True With .Columns .Add("Name").Width = 96 With .Add("Title") .Width = 96 End With .Add("City") End With With .Items h0 = .AddItem("Nancy Davolio") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"Seattle") h0 = .AddItem("Andrew Fuller") .set_CellValue(h0,1,"Vice President, Sales") .set_CellValue(h0,2,"Tacoma") .set_SelectItem(h0,True) h0 = .AddItem("Janet Leverling") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"Kirkland") h0 = .AddItem("Margaret Peacock") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"Redmond") h0 = .AddItem("Steven Buchanan") .set_CellValue(h0,1,"Sales Manager") .set_CellValue(h0,2,"London") h0 = .AddItem("Michael Suyama") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"London") h0 = .AddItem("Robert King") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"London") h0 = .AddItem("Laura Callahan") .set_CellValue(h0,1,"Inside Sales Coordinator") .set_CellValue(h0,2,"Seattle") h0 = .AddItem("Anne Dodsworth") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"London") End With .FilterBarPromptColumns = "1" .FilterBarPromptPattern = "Vice Sales" .FilterBarPromptType = exontrol.EXG2ANTTLib.FilterPromptEnum.exFilterPromptContainsAll .EndUpdate() End With |
1809 |
How can I display the limits/margins of the project, in the overview part of the control
With Exg2antt1 .BeginUpdate() .VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABVADg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSBcEgTDaMYzgMBYJhEMQyDSAUIjPEyMg0DjIIwgJIUaw0GSXIRkGQZC" & _ "hGJooTJQMrTZIEbQxHSkIyRVTmZACS5NRZPYy0FAkQhlFSbJBCOKwVomR5KUxTVg1DJwahLCKULLhGI7KgObIRSJOcZ1XAdCQ0cB0XpAC6LaqSA4nSjKcqwJKEZRJIyj" & _ "JwgSrrWhePoJYBVAAQPQdDYaCivK5uWK6PqKUIlZBQGQVNS1MRrLSEcwgPKgAyzDadZzfQAWTZFTQjN61RgtXR6eyoAJ0aziFDVFo0WRlEwacorGhcbgPPrCRrxGBVNw" & _ "gGOJo4kIeASB0Zw/iGDoym6dobh2XpiDWJo5HMd56h6dxjlICIEhQDQmDOIZUmQZZlAADpYHIEQ3nUGgNhCEIhAkawamAAAYEWRAGB2bA2EqYg2AyA4glgPgSgQYRIEI" & _ "FoEmEeBWBiBphFAAgPDwDgDEycQ4A0Q5IwkDwjgyWA8k4SIsmUNoPEOFJbD0DhjHINA3E8Q4eDiDojhiYJmg+Ixokic4LmKQxiCkNk2CCX4DmGaA0nAN4NBiDJSDwTgT" & _ "Eycg4E0WIYlcPJiiiMJZhCTYpgCcw5g2OYOGWGQmCkEJkheYopGoVw1GSGQuA2ExIlOQJcDOZJzEDSJNBiAgiU4Q5GCeChNHkHJygsaBzGaCYimiCY0mMNZoCMWhUDUJ" & _ "5pkYTIDk6YxwkwO5NlMOoch6JQJm4U4JCIMxWFSKbCBoKIgmJDAuDgKhohKIoTk0GhaHOJgNiMKJuDaaYzHCTYnAyaZmjSKIiDiCghjEYg6AaR4yk0OpOiFSQLAKNgjG" & _ "cQ40lkMhOmqZo7DKTpzG6Pw3CmYx2HiNAsCqBh8h6Z5bh6T4oC0G4Im+OAtlMNpTjUTYDCKVo2C3QBLi6a5bH6YY4EyehzAGO4wEwDoejwK5rnK95vDgPJsDWTBjjSWA" & _ "xnEK5aleNhriuawKi8Lp7H8HpHHGXBskyQpxguXwNgMTpDFiRZDnEExfBSPRvHuXwYkycYslae5NjMQwrDGNZxFyHINDsDRTBMKZKnKLIwm2S4xF0Jw8lKTIcm9eA0hy" & _ "QwuksM5jiyVQwnQDQIlaVo0EyLwQlGcRNCME5EjKfYXGSWEhDMQ5QnOahHG6KwoFOCoFiOaBNlcdIjiQag7HOL0dwuxKC1aeNQI4BQihNDoEwXowxmh8CIL8Yg8ROBfA" & _ "SMcaIOR6CHBkMgLgrwUjLHkHMG4NQaBzE4MQaIyw5gxEsH0Dw9FBBNA6PUDoLwpjTHqF0N4WQShSHgGwcY2RkhdFCL8bYdwOivDqNse4fRnh5G+PYEgaR1B0E4B4D4ix" & _ "xB4G8E8SI5R8D+DeJUc4eRPB/EaJ8DwpwojDHUPofwtxYjtH2F4d4sx3j7E+AcXo8B9geFCNYOIHhfg/GmPQPoXw3jZHuPoX4hxuj1H8J8T43RPhDEgM8eo/B/iQGuPw" & _ "fxEh1guAIAwQAgCAg") .BackColorLevelHeader = .BackColor With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,48) .OverviewVisible = &H400 Or exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowSelMargins Or exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowMargins Or exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScaleBottom Or exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible .OverviewHeight = 64 .OverviewSelBackColor32 = &H1000000 .OverviewBackColor = Color.FromArgb(250,250,250) End With .Columns.Add("Column") With .Items .AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/11/2001#) .AddBar(.AddItem("Item 2"),"Task",#2/2/2001#,#2/11/2001#) .AddBar(.AddItem("Item 3"),"Task",#3/2/2001#,#3/11/2001#) End With .EndUpdate() End With |
1808 |
Is it possible to display a time-scale for the overview part of the control (separated)
With Exg2antt1 .BeginUpdate() .BackColorLevelHeader = .BackColor With .Chart .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,48) .OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScaleSplit Or exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible .OverviewHeight = 48 .LevelCount = 2 End With .Columns.Add("Column") With .Items .AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/11/2001#) .AddBar(.AddItem("Item 2"),"Task",#2/2/2001#,#2/11/2001#) .AddBar(.AddItem("Item 3"),"Task",#3/2/2001#,#3/11/2001#) End With .EndUpdate() End With |
1807 |
Is it possible to display a time-scale for the overview part of the control
With Exg2antt1 .BeginUpdate() .BackColorLevelHeader = .BackColor With .Chart .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,48) .OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScale Or exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible .LevelCount = 2 End With .Columns.Add("Column") With .Items .AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/11/2001#) .AddBar(.AddItem("Item 2"),"Task",#2/2/2001#,#2/11/2001#) .AddBar(.AddItem("Item 3"),"Task",#3/2/2001#,#3/11/2001#) End With .EndUpdate() End With |
1806 |
How can I display the time-scale only, in the overview part of the control
With Exg2antt1 .BeginUpdate() .BackColorLevelHeader = .BackColor With .Chart .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,48) .OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScale Or exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewHideBars Or exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible .LevelCount = 2 End With .Columns.Add("Column") With .Items .AddBar(.AddItem("Item 1"),"Task",#1/2/2001#,#1/11/2001#) .AddBar(.AddItem("Item 2"),"Task",#2/2/2001#,#2/11/2001#) .AddBar(.AddItem("Item 3"),"Task",#3/2/2001#,#3/11/2001#) End With .EndUpdate() End With |
1805 |
How can I detect that the mouse pointer is within an InsideZoom object
' MouseMove event - Occurs when the user moves the mouse. Private Sub Exg2antt1_MouseMoveEvent(ByVal sender As System.Object,ByVal Button As Short,ByVal Shift As Short,ByVal X As Integer,ByVal Y As Integer) Handles Exg2antt1.MouseMoveEvent Dim d,iz With Exg2antt1 With .Chart d = .get_DateFromPoint(-1,-1) iz = .InsideZooms.get_Contains(d) Debug.Print( d ) Debug.Print( "If the iz object is nothing, the date is not zoomed, else it is." ) Debug.Print( iz ) End With End With End Sub With Exg2antt1 .BeginUpdate() With .Chart .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,0) .LevelCount = 2 .FirstWeekDay = exontrol.EXG2ANTTLib.WeekDayEnum.exMonday .AllowInsideZoom = True .InsideZooms.Add(#1/10/2001#) End With .EndUpdate() End With |
1804 |
Is it possible to word-wrap text/caption on the bar, so it gets displayed on multiple lines
Dim h With Exg2antt1 .BeginUpdate() .ScrollBySingleLine = True .ItemsAllowSizing = exontrol.EXG2ANTTLib.ItemsAllowSizingEnum.exResizeItem .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exHLines .HeaderHeight = 28 .DefaultItemHeight = 24 .BackColorLevelHeader = .BackColor .HeaderAppearance = exontrol.EXG2ANTTLib.AppearanceEnum.Bump .Columns.Add("Tasks") With .Chart .LevelCount = 2 .set_PaneWidth(False,128) .FirstVisibleDate = #1/1/2001# .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exHLines With .Bars.Copy("Task","TaskB") .Height = 15 .Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternBox .StartColor = Color.FromArgb(204,232,255) .EndColor = .StartColor .Color = Color.FromArgb(0,0,255) End With With .Bars.Item("Task") .Height = -1 .Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternBox .StartColor = Color.FromArgb(204,232,255) .EndColor = .StartColor .Color = Color.FromArgb(0,0,255) End With End With With .Items h = .AddItem("Word-Wrap Inside") .AddBar(h,"Task",#1/9/2001#,#1/13/2001#,"A1") .set_ItemBar(h,"A1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt,"none[(2,2,100%-4,100%-4),text=`This is a bit of text that should break the line`,wordwrap]") h = .AddItem("Word-Wrap Inside") .AddBar(h,"Task",#1/5/2001#,#1/19/2001#,"A2") .set_ItemBar(h,"A2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt,"none[(2,2,100%-4,100%-4),align=0x11,text=`This is a bit of text that should break the line`,wordwrap]") h = .AddItem("Word-Wrap Back") .AddBar(h,"TaskB",#1/9/2001#,#1/13/2001#,"A3") .set_ItemBar(h,"A3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt,"client[align=0x11,text=`This is a bit of text that should break the line`,wordwrap]") .set_ItemBar(h,"A3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtFlags,2) End With .EndUpdate() End With |
1803 |
Can I set the search box / filterbarprompt to invisible, so I can use my own input and *string* via VBA
Dim h0 With Exg2antt1 .BeginUpdate() .ColumnAutoResize = True .ContinueColumnScroll = False .MarkSearchColumn = False .SearchColumnIndex = 1 .FilterBarHeight = 0 .FilterBarPromptVisible = True .Chart.set_PaneWidth(True,0) With .Columns .Add("Name").Width = 96 .Add("Title").Width = 96 .Add("City") End With With .Items h0 = .AddItem("Nancy Davolio") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"Seattle") h0 = .AddItem("Andrew Fuller") .set_CellValue(h0,1,"Vice President, Sales") .set_CellValue(h0,2,"Tacoma") .set_SelectItem(h0,True) h0 = .AddItem("Janet Leverling") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"Kirkland") h0 = .AddItem("Margaret Peacock") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"Redmond") h0 = .AddItem("Steven Buchanan") .set_CellValue(h0,1,"Sales Manager") .set_CellValue(h0,2,"London") h0 = .AddItem("Michael Suyama") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"London") h0 = .AddItem("Robert King") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"London") h0 = .AddItem("Laura Callahan") .set_CellValue(h0,1,"Inside Sales Coordinator") .set_CellValue(h0,2,"Seattle") h0 = .AddItem("Anne Dodsworth") .set_CellValue(h0,1,"Sales Representative") .set_CellValue(h0,2,"London") End With .FilterBarPromptPattern = "London" .EndUpdate() End With |
1802 |
How to load a hierarchy using the control's DataSource property (Parent-ID-Relation)
' AddItem event - Occurs after a new Item has been inserted to Items collection. Private Sub Exg2antt1_AddItem(ByVal sender As System.Object,ByVal Item As Integer) Handles Exg2antt1.AddItem With Exg2antt1 With .Items .SetParent(Item,.get_FindItem(.get_CellValue(Item,"ReportsTo"),"EmployeeID")) End With End With End Sub Dim rs With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot .ColumnAutoResize = False .ContinueColumnScroll = False rs = New ADODB.Recordset() With rs .Open("SELECT * FROM Employees ORDER BY ReportsTo","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) End With .DataSource = rs .Items.set_ExpandItem(0,True) .EndUpdate() End With |
1801 |
How can I highlight the limits/margins of a summary bar, according with the child bars
Dim hSummary,hTask With Exg2antt1 .BeginUpdate() With .VisualAppearance .Add(1,"gBFLBCJwBAEHhEJAAEhABRkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjhwkAIIQK/cZRPC0Ow8GSEZAgOKIch6FgCQjEIxDKIsVRZEiDYRmGLpIiOJoWSQBUIyJKoA" & _ "Q0f6fIziaTpNiGL4yTBPMzyJRcEx1GyBZ5negaAo2AwIQiUBomGahajkMqZQAJaCSCI2Y4eDZCIoTXR1WAxDq3ZruKpLUpOc4DOrEMIwCEBA=") .Add(2,"CP:1 -4 0 5 0") .Add(3,"gBFLBCJwBAEHhEJAAEhABOMGACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQRHc5TN" & _ "CMTRRECDY4kAYpAiKRYbSpAcyQHQ8bQtHwYKAoOg6JjWIAHRqCMI0XINHQ3FwaRJsCwoJhOZIDWZENDQTSsLSxJSkIRfe4wArNf4XVBVMqSdKEZRJLybJwADApAo2eIl" & _ "QjJdQ4TSdBSdQwDLYhECpbwCT6JT7jGLQJZsNyvBLIYDrKA8UozFqHQRYNhxDZNShhM6rMigPQQAq8AKlRbVNzXLamLwHRS9BpoORhUjHD4bVxVOyaPpAAaBFbhI44QZ" & _ "OHYNYfjgaI0BySp8HMVZdlgaxtBqexWkqOw1lGbZzlwfQ0AwYR/gka5FiMGpgkQYYviGV4kBUWpmlsaYGHMEgACECQUAaEYMHQHRHCGFRBECRJkGQQgTGCVBoDYQhCgQ" & _ "JZoG4EIAGEFwGB+dwxHaB5iAabReggYhGnUToJGIRgCCiCBdjiNguGmYo4gIKoMGIKIeDSCYTGiXg4EITo3hAiJAICA==") End With .Columns.Add("Task") With .Chart .set_PaneWidth(False,128) .FirstVisibleDate = #1/1/2001# .Bars.Item("Summary").Color32 = &H3000000 End With With .Items hSummary = .AddItem("Summary") .AddBar(hSummary,"Summary",#1/2/2001#,#1/2/2001#,"") hTask = .InsertItem(hSummary,Nothing,"Task A") .AddBar(hTask,"Task",#1/2/2001#,#1/5/2001#,"K1") hTask = .InsertItem(hSummary,Nothing,"Task B") .AddBar(hTask,"Task",#1/4/2001#,#1/8/2001#,"K2") hTask = .InsertItem(hSummary,Nothing,"Task C") .AddBar(hTask,"Task",#1/6/2001#,#1/10/2001#,"K3") .set_ExpandItem(hSummary,True) .DefineSummaryBars(hSummary,"",-1,"<*>") .set_ItemBar(hSummary,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exSummaryBarBackColor,33554432) End With .EndUpdate() End With |